eng: fix prelaunch task on recent node versions

Closes #212888
This commit is contained in:
Connor Peet 2024-05-20 10:16:22 -07:00
parent c00f2792a4
commit cb3c3cb125
No known key found for this signature in database
GPG key ID: CF8FD2EA0DBC61BD
2 changed files with 2 additions and 2 deletions

View file

@ -12,7 +12,7 @@ const yarn = process.platform === 'win32' ? 'yarn.cmd' : 'yarn';
const rootDir = path.resolve(__dirname, '..', '..');
function runProcess(command, args = []) {
return new Promise((resolve, reject) => {
const child = (0, child_process_1.spawn)(command, args, { cwd: rootDir, stdio: 'inherit', env: process.env });
const child = (0, child_process_1.spawn)(command, args, { cwd: rootDir, stdio: 'inherit', env: process.env, shell: process.platform === 'win32' });
child.on('exit', err => !err ? resolve() : process.exit(err ?? 1));
child.on('error', reject);
});

View file

@ -14,7 +14,7 @@ const rootDir = path.resolve(__dirname, '..', '..');
function runProcess(command: string, args: ReadonlyArray<string> = []) {
return new Promise<void>((resolve, reject) => {
const child = spawn(command, args, { cwd: rootDir, stdio: 'inherit', env: process.env });
const child = spawn(command, args, { cwd: rootDir, stdio: 'inherit', env: process.env, shell: process.platform === 'win32' });
child.on('exit', err => !err ? resolve() : process.exit(err ?? 1));
child.on('error', reject);
});