diff --git a/src/execCmd.ts b/src/execCmd.ts index 58c1553b..019b08b4 100644 --- a/src/execCmd.ts +++ b/src/execCmd.ts @@ -114,7 +114,7 @@ const getExitCodeError = (cmd: string, expectedCode: number, output: ShellString * * If the cli is 'inherit', the executable preference order is: * 1. TESTKIT_EXECUTABLE_PATH env var - * 2. `bin/dev.js` (default) + * 2. `bin/run.js` (default) * * @returns The command string with CLI executable. E.g., `"node_modules/bin/sf org:create:user -a testuser1"` */ @@ -124,11 +124,11 @@ const determineExecutable = (cli: CLI = 'inherit'): string => { let bin = cli === 'inherit' ? env.getString('TESTKIT_EXECUTABLE_PATH') ?? - pathJoin(process.cwd(), 'bin', process.platform === 'win32' ? 'dev.cmd' : 'dev.js') + pathJoin(process.cwd(), 'bin', process.platform === 'win32' ? 'run.cmd' : 'run.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', ''); + // Support plugins who still use bin/run instead of bin/run.js + if (bin.endsWith('run.js') && !fs.existsSync(bin)) bin = bin.replace('.js', ''); const which = shelljs.which(bin); let resolvedPath = pathResolve(bin); diff --git a/src/testSession.ts b/src/testSession.ts index ced2532e..1b3eab4e 100644 --- a/src/testSession.ts +++ b/src/testSession.ts @@ -156,22 +156,16 @@ export class TestSession exte projectDir = this.project.dir; } - // The default bin/dev in execCmd will no longer resolve properly when + // The default bin/run in execCmd will no longer resolve properly when // a test project is used since process.cwd is changed. If the // TESTKIT_EXECUTABLE_PATH env var is not being used, then set it // to use the bin/dev from the cwd now. if (!env.getString('TESTKIT_EXECUTABLE_PATH')) { - let binDev = path.join(process.cwd(), 'bin', 'dev'); - if (!fs.existsSync(binDev)) { - binDev += '.js'; - } - - // only used in the case when bin/dev or bin/dev.js doesn't exist let binRun = path.join(process.cwd(), 'bin', 'run'); if (!fs.existsSync(binRun)) { binRun += '.js'; } - env.setString('TESTKIT_EXECUTABLE_PATH', fs.existsSync(binDev) ? binDev : binRun); + env.setString('TESTKIT_EXECUTABLE_PATH', binRun); } this.stubCwd(projectDir);