diff --git a/tests/legacy-cli/e2e/utils/process.ts b/tests/legacy-cli/e2e/utils/process.ts index 9ce14fb939..541aaf31a6 100644 --- a/tests/legacy-cli/e2e/utils/process.ts +++ b/tests/legacy-cli/e2e/utils/process.ts @@ -345,7 +345,7 @@ export function globalNpm(args: string[], env?: NodeJS.ProcessEnv) { ); } - return _exec({ silent: true, env }, process.execPath, [require.resolve('npm'), ...args]); + return _exec({ silent: true, env }, 'node', [require.resolve('npm'), ...args]); } export function npm(...args: string[]) { @@ -353,7 +353,7 @@ export function npm(...args: string[]) { } export function node(...args: string[]) { - return _exec({}, process.execPath, args); + return _exec({}, 'node', args); } export function git(...args: string[]) { diff --git a/tests/legacy-cli/e2e/utils/project.ts b/tests/legacy-cli/e2e/utils/project.ts index 1f25eb7810..d48d6e6340 100644 --- a/tests/legacy-cli/e2e/utils/project.ts +++ b/tests/legacy-cli/e2e/utils/project.ts @@ -67,7 +67,7 @@ export async function prepareProjectForE2e(name: string) { // Often fails the first time so attempt twice if necessary. const runWebdriverUpdate = () => exec( - process.execPath, + 'node', 'node_modules/protractor/bin/webdriver-manager', 'update', '--standalone', diff --git a/tests/legacy-cli/e2e/utils/registry.ts b/tests/legacy-cli/e2e/utils/registry.ts index 143d398093..3cfee5f714 100644 --- a/tests/legacy-cli/e2e/utils/registry.ts +++ b/tests/legacy-cli/e2e/utils/registry.ts @@ -19,14 +19,10 @@ export async function createNpmRegistry( configContent = configContent.replace(/\$\{HTTPS_PORT\}/g, String(httpsPort)); await writeFile(join(registryPath, 'verdaccio.yaml'), configContent); - return spawn( - process.execPath, - [require.resolve('verdaccio/bin/verdaccio'), '-c', './verdaccio.yaml'], - { - cwd: registryPath, - stdio: 'inherit', - }, - ); + return spawn('node', [require.resolve('verdaccio/bin/verdaccio'), '-c', './verdaccio.yaml'], { + cwd: registryPath, + stdio: 'inherit', + }); } // Token was generated using `echo -n 'testing:s3cret' | openssl base64`.