mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-26 10:16:01 +01:00
Bypass execution policy to gather CPU load
This commit is contained in:
@@ -129,7 +129,7 @@ export function listProcesses(rootPid: number): Promise<ProcessItem> {
|
||||
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', ['-Command', commandLine]);
|
||||
const cmd = spawn('powershell.exe', ['-ExecutionPolicy', 'Bypass', '-Command', commandLine]);
|
||||
|
||||
let stdout = '';
|
||||
let stderr = '';
|
||||
|
||||
Reference in New Issue
Block a user