Fix tasks using default terminal args

Fixes #126052
This commit is contained in:
Alex Ross 2021-07-01 14:41:32 +02:00
parent a3d47b0b3d
commit 4ac64f292a
No known key found for this signature in database
GPG key ID: 89DDDBA66CBA7840

View file

@ -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;
}