Skip to content

Commit

Permalink
Merge pull request #236514 from microsoft/tyriar/219583
Browse files Browse the repository at this point in the history
Speculative fix when pwsh is 'powershell' on mac/linux
  • Loading branch information
Tyriar authored Dec 18, 2024
2 parents 7f9c7a4 + 9fc5861 commit ebe010b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vs/platform/shell/node/shellEnv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ async function doResolveUnixShellEnv(logService: ILogService, token: Cancellatio
const name = basename(systemShellUnix);
let command: string, shellArgs: Array<string>;
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}'''`;
Expand Down

0 comments on commit ebe010b

Please sign in to comment.