提交 87aa00a8 编写于 作者: A Andre Weinand

add Powershell '&' if necessary; fixes #33020

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