From 4ac64f292a454093c4ec6d431b1e619b9ae760c2 Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Thu, 1 Jul 2021 14:41:32 +0200 Subject: [PATCH] Fix tasks using default terminal args Fixes #126052 --- src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts b/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts index 8400d0babf8..5c6d26d0384 100644 --- a/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts +++ b/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.ts @@ -1041,6 +1041,10 @@ export class TerminalTaskSystem extends Disposable implements ITaskSystem { let shellOptions: ShellConfiguration | undefined = task.command.options && task.command.options.shell; if (shellOptions) { if (shellOptions.executable) { + // Clear out the args so that we don't end up with mismatched args. + if (shellOptions.executable !== shellLaunchConfig.executable) { + shellLaunchConfig.args = undefined; + } shellLaunchConfig.executable = await this.resolveVariable(variableResolver, shellOptions.executable); shellSpecified = true; }