From 9fc5861de2162b2f6ab6f316c655679fdaf61eb0 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Wed, 18 Dec 2024 11:51:32 -0800 Subject: [PATCH] Speculative fix when pwsh is 'powershell' on mac/linux Fixes #219583 --- src/vs/platform/shell/node/shellEnv.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/platform/shell/node/shellEnv.ts b/src/vs/platform/shell/node/shellEnv.ts index 2d3ef3ead0d49..31a1ebe1ecf11 100644 --- a/src/vs/platform/shell/node/shellEnv.ts +++ b/src/vs/platform/shell/node/shellEnv.ts @@ -129,7 +129,7 @@ async function doResolveUnixShellEnv(logService: ILogService, token: Cancellatio const name = basename(systemShellUnix); let command: string, shellArgs: Array; const extraArgs = ''; - if (/^pwsh(-preview)?$/.test(name)) { + if (/^(?:pwsh(?:-preview)|powershell)$/.test(name)) { // Older versions of PowerShell removes double quotes sometimes so we use "double single quotes" which is how // you escape single quotes inside of a single quoted string. command = `& '${process.execPath}' ${extraArgs} -p '''${mark}'' + JSON.stringify(process.env) + ''${mark}'''`;