Skip to content

Commit 9978b2c

Browse files
alan-agius4angular-robot[bot]
authored andcommitted
Revert "test: use execPath to launch child node processes"
This reverts commit b8e68eb.
1 parent 2589df0 commit 9978b2c

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

tests/legacy-cli/e2e/utils/process.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,15 +345,15 @@ export function globalNpm(args: string[], env?: NodeJS.ProcessEnv) {
345345
);
346346
}
347347

348-
return _exec({ silent: true, env }, process.execPath, [require.resolve('npm'), ...args]);
348+
return _exec({ silent: true, env }, 'node', [require.resolve('npm'), ...args]);
349349
}
350350

351351
export function npm(...args: string[]) {
352352
return _exec({}, 'npm', args);
353353
}
354354

355355
export function node(...args: string[]) {
356-
return _exec({}, process.execPath, args);
356+
return _exec({}, 'node', args);
357357
}
358358

359359
export function git(...args: string[]) {

tests/legacy-cli/e2e/utils/project.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export async function prepareProjectForE2e(name: string) {
6767
// Often fails the first time so attempt twice if necessary.
6868
const runWebdriverUpdate = () =>
6969
exec(
70-
process.execPath,
70+
'node',
7171
'node_modules/protractor/bin/webdriver-manager',
7272
'update',
7373
'--standalone',

tests/legacy-cli/e2e/utils/registry.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,10 @@ export async function createNpmRegistry(
1919
configContent = configContent.replace(/\$\{HTTPS_PORT\}/g, String(httpsPort));
2020
await writeFile(join(registryPath, 'verdaccio.yaml'), configContent);
2121

22-
return spawn(
23-
process.execPath,
24-
[require.resolve('verdaccio/bin/verdaccio'), '-c', './verdaccio.yaml'],
25-
{
26-
cwd: registryPath,
27-
stdio: 'inherit',
28-
},
29-
);
22+
return spawn('node', [require.resolve('verdaccio/bin/verdaccio'), '-c', './verdaccio.yaml'], {
23+
cwd: registryPath,
24+
stdio: 'inherit',
25+
});
3026
}
3127

3228
// Token was generated using `echo -n 'testing:s3cret' | openssl base64`.

0 commit comments

Comments
 (0)