1
0
mirror of https://github.com/angular/angular-cli.git synced 2025-05-25 08:41:39 +08:00

Revert "test: use execPath to launch child node processes"

This reverts commit b8e68eb28aefa8c629fefb542db3860838110b43.
This commit is contained in:
Alan Agius 2022-11-28 15:05:06 +01:00 committed by angular-robot[bot]
parent 2589df0be1
commit 9978b2c6a0
3 changed files with 7 additions and 11 deletions
tests/legacy-cli/e2e/utils

@ -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[]) {

@ -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',

@ -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`.