Fix the "tsc watch" task when references are used

Moves the `--watch` option at the end of the `tsc` invocation, as `--build`
is required to be the first option on the call.

Fixes #66875
This commit is contained in:
Romain Marcadier-Muller
2019-01-21 16:22:36 -08:00
committed by 👨🏼‍💻 Romain Marcadier-Muller
parent 96ab284b4e
commit ea59a710ca

View File

@@ -197,7 +197,7 @@ class TscTaskProvider implements vscode.TaskProvider {
project.workspaceFolder || vscode.TaskScope.Workspace,
localize('buildAndWatchTscLabel', 'watch - {0}', label),
'tsc',
new vscode.ShellExecution(command, ['--watch', ...args]),
new vscode.ShellExecution(command, [...args, '--watch']),
'$tsc-watch');
watchTask.group = vscode.TaskGroup.Build;
watchTask.isBackground = true;
@@ -272,4 +272,4 @@ export default class TypeScriptTaskProviderManager {
this.taskProviderSub = vscode.workspace.registerTaskProvider('typescript', new TscTaskProvider(this.client));
}
}
}
}