Skip to content

Commit

Permalink
Fix shellExecutable basename for tasks
Browse files Browse the repository at this point in the history
Part of #142196
  • Loading branch information
alexr00 committed Feb 8, 2022
1 parent 6852232 commit a5bf6bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1440,9 +1440,9 @@ export class TerminalTaskSystem extends Disposable implements ITaskSystem {
let commandLine = result.join(' ');
// There are special rules quoted command line in cmd.exe
if (platform === Platform.Platform.Windows) {
if (shellExecutable === 'cmd' && commandQuoted && argQuoted) {
if (basename === 'cmd' && commandQuoted && argQuoted) {
commandLine = '"' + commandLine + '"';
} else if ((shellExecutable === 'powershell' || shellExecutable === 'pwsh') && commandQuoted) {
} else if ((basename === 'powershell' || basename === 'pwsh') && commandQuoted) {
commandLine = '& ' + commandLine;
}
}
Expand Down

0 comments on commit a5bf6bc

Please sign in to comment.