Skip to content

Commit

Permalink
feat: support bin/dev.js scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Sep 14, 2023
1 parent 23208cb commit ec9eef9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/execCmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,14 @@ const getExitCodeError = (cmd: string, expectedCode: number, output: ShellString
const determineExecutable = (cli: CLI = 'inherit'): string => {
const debug = Debug('testkit:determineExecutable');

const bin =
let bin =
cli === 'inherit'
? env.getString('TESTKIT_EXECUTABLE_PATH') ??
pathJoin(process.cwd(), 'bin', process.platform === 'win32' ? 'dev.cmd' : 'dev')
pathJoin(process.cwd(), 'bin', process.platform === 'win32' ? 'dev.cmd' : 'dev.js')
: cli;

// Support plugins who still use bin/dev instead of bin/dev.js
if (bin.endsWith('dev.js') && !fs.existsSync(bin)) bin = bin.replace('.js', '');
const which = shelljs.which(bin);
let resolvedPath = pathResolve(bin);

Expand Down

0 comments on commit ec9eef9

Please sign in to comment.