From 87aa00a849ab1389a547728d103bcea049f3b41c Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Wed, 23 Aug 2017 12:27:24 +0200 Subject: [PATCH] add Powershell '&' if necessary; fixes #33020 --- .../parts/debug/electron-browser/terminalSupport.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/terminalSupport.ts b/src/vs/workbench/parts/debug/electron-browser/terminalSupport.ts index cdbc65afbc0..3456d7b4f41 100644 --- a/src/vs/workbench/parts/debug/electron-browser/terminalSupport.ts +++ b/src/vs/workbench/parts/debug/electron-browser/terminalSupport.ts @@ -81,7 +81,7 @@ export class TerminalSupport { shellType = ShellType.cmd; } else if (shell.indexOf('bash') >= 0) { shellType = ShellType.bash; - } else if (shell.indexOf('c:\\program files\\git\\bin\\bash.exe') >= 0) { + } else if (shell.indexOf('git\\bin\\bash.exe') >= 0) { shellType = ShellType.bash; } @@ -105,8 +105,12 @@ export class TerminalSupport { command += `$env:${key}='${args.env[key]}'; `; } } - for (let a of args.args) { - command += `${quote(a)} `; + if (args.args && args.args.length > 0) { + const cmd = quote(args.args.shift()); + command += (cmd[0] === '\'') ? `& ${cmd} ` : `${cmd} `; + for (let a of args.args) { + command += `${quote(a)} `; + } } break; -- GitLab