提交 0759f77b 编写于 作者: D Dirk Baeumer

Fixes #40228: code --status doesn't work if your shell is PowerShell

上级 20f07c7e
......@@ -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 = '';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册