From 695e89c76a3e1ddfb8fb520118a8be593e2c6f11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Pupier?= Date: Thu, 2 May 2024 15:50:09 +0200 Subject: [PATCH] FUSETOOLS2-2308: provide workaround to install VS Code extensions with latest Node security release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit see https://github.com/nodejs/node/issues/52554#issuecomment-2060026269 Applying it on Windows only otherwise it is breaking MacOS with error: `/bin/sh: /Users/runner/work/vscode-camelk/vscode-camelk/.vscode-test/vscode-darwin-arm64-1.85.2/Visual: No such file or directory` Signed-off-by: Aurélien Pupier --- src/test/runTests.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/runTests.ts b/src/test/runTests.ts index 810d7db7e..fd52e8695 100644 --- a/src/test/runTests.ts +++ b/src/test/runTests.ts @@ -2,6 +2,7 @@ import * as path from 'path'; import * as cp from 'child_process'; import { downloadAndUnzipVSCode, resolveCliArgsFromVSCodeExecutablePath, runTests } from '@vscode/test-electron'; +import * as os from 'os'; async function main(): Promise { try { @@ -46,7 +47,8 @@ async function main(): Promise { function installExtraExtension(cliPath: string, extensionId: string, args: string[]) { cp.spawnSync(cliPath, [...args, '--install-extension', extensionId, '--force'], { encoding: 'utf-8', - stdio: 'inherit' + stdio: 'inherit', + shell: os.platform() === 'win32' // to workaround https://github.com/nodejs/node/issues/52554#issuecomment-2060026269 }); console.log(`VS Code extension ${extensionId} installed`); }