Skip to content

Commit

Permalink
fix: fix null path
Browse files Browse the repository at this point in the history
  • Loading branch information
WillieRuemmele committed Oct 26, 2023
1 parent 96ad435 commit 29fc6e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils/sf-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ const resolveConfig = (path) => {
path = dirname(result.filepath);
}

const usesJsBinScripts = existsSync(join(path, 'bin', 'dev.js'));
// if path is undefined/null, assume we're executing from a plugin root
const usesJsBinScripts = existsSync(join(path ?? process.cwd(), 'bin', 'dev.js'));
const dev = usesJsBinScripts ? 'ts-node "./bin/dev.js"' : '"./bin/dev"';
const pluginDefaults = {
scripts: {
Expand Down

0 comments on commit 29fc6e8

Please sign in to comment.