From 313d05ccd8d6482ef57ee1960e48d2f5975c4ade Mon Sep 17 00:00:00 2001 From: Sheng Chen Date: Fri, 23 Aug 2024 12:56:27 +0800 Subject: [PATCH] Add shell: true --- test/index.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/index.ts b/test/index.ts index 66d0b20a..c89db539 100644 --- a/test/index.ts +++ b/test/index.ts @@ -16,10 +16,14 @@ async function main(): Promise { // Resolve redhat.java dependency const [cli, ...args] = resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath); - cp.spawnSync(cli, [...args, '--install-extension', 'redhat.java'], { + const options: cp.SpawnSyncOptionsWithStringEncoding = { encoding: 'utf-8', - stdio: 'inherit' - }); + stdio: 'inherit', + }; + if (process.platform === 'win32') { + options.shell = true; + } + cp.spawnSync(cli, [...args, '--install-extension', 'redhat.java'], options); // The folder containing the Extension Manifest package.json // Passed to `--extensionDevelopmentPath`