Skip to content

Commit 4f3e056

Browse files
committed
run in shell windows only
1 parent b025796 commit 4f3e056

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/core/scripts/test/launchTestUtilities.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { join, resolve } from 'path'
1010
import { runTests } from '@vscode/test-electron'
1111
import { VSCODE_EXTENSION_ID } from '../../src/shared/extensions'
1212
import { TestOptions } from '@vscode/test-electron/out/runTest'
13+
import { isWin } from '../../src/shared/vscode/env'
1314

1415
const envvarVscodeTestVersion = 'VSCODE_TEST_VERSION'
1516

@@ -182,10 +183,11 @@ async function invokeVSCodeCli(vsCodeExecutablePath: string, args: string[]): Pr
182183
}
183184

184185
console.log(`Invoking vscode CLI command:\n "${cli}" ${JSON.stringify(cmdArgs)}`)
186+
// Shell option must be true on windows to avoid security error: https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2
185187
const spawnResult = proc.spawnSync(cli, cmdArgs, {
186188
encoding: 'utf-8',
187189
stdio: 'pipe',
188-
shell: true,
190+
shell: isWin(),
189191
})
190192

191193
if (spawnResult.status !== 0) {

0 commit comments

Comments
 (0)