Skip to content

Commit

Permalink
Fixes #40228: code --status doesn't work if your shell is PowerShell
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaeumer committed Dec 19, 2017
1 parent 20f07c7 commit 0759f77
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/vs/base/node/ps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ export function listProcesses(rootPid: number): Promise<ProcessItem> {
}
};

const execMain = path.basename(process.execPath).replace(/ /g, '` ');
const script = URI.parse(require.toUrl('vs/base/node/ps-win.ps1')).fsPath.replace(/ /g, '` ');
const commandLine = `${script} -ProcessName ${execMain} -MaxSamples 3`;
const cmd = spawn('powershell.exe', ['-ExecutionPolicy', 'Bypass', '-Command', commandLine]);
const execMain = path.basename(process.execPath);
const script = URI.parse(require.toUrl('vs/base/node/ps-win.ps1')).fsPath;
const commandLine = `& {& '${script}' -ProcessName '${execMain}' -MaxSamples 3}`;
const cmd = spawn('powershell.exe', ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-Command', commandLine]);

let stdout = '';
let stderr = '';
Expand Down

0 comments on commit 0759f77

Please sign in to comment.