From fad3a89b93ad51fdc6bb086dfbd135aba15722b1 Mon Sep 17 00:00:00 2001 From: Connor Peet Date: Mon, 20 May 2024 10:16:22 -0700 Subject: [PATCH] eng: fix prelaunch task on recent node versions Closes #212888 --- build/lib/preLaunch.js | 2 +- build/lib/preLaunch.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/lib/preLaunch.js b/build/lib/preLaunch.js index efcb3220084e15..1bfe7f573f6a8d 100644 --- a/build/lib/preLaunch.js +++ b/build/lib/preLaunch.js @@ -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); }); diff --git a/build/lib/preLaunch.ts b/build/lib/preLaunch.ts index 3d3f513b59140b..d6776e6279879c 100644 --- a/build/lib/preLaunch.ts +++ b/build/lib/preLaunch.ts @@ -14,7 +14,7 @@ const rootDir = path.resolve(__dirname, '..', '..'); function runProcess(command: string, args: ReadonlyArray = []) { return new Promise((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); });