Fix executeTask for composite tasks

Fixes #112545
This commit is contained in:
Alex Ross
2020-12-16 17:01:36 +01:00
parent c78bc56460
commit fc6bf56844

View File

@@ -50,11 +50,12 @@ export class ExtHostTask extends ExtHostTaskBase {
}
public async executeTask(extension: IExtensionDescription, task: vscode.Task): Promise<vscode.TaskExecution> {
if (!task.execution) {
const tTask = (task as types.Task);
if (!task.execution && (tTask._id === undefined)) {
throw new Error('Tasks to execute must include an execution');
}
const tTask = (task as types.Task);
// We have a preserved ID. So the task didn't change.
if (tTask._id !== undefined) {
// Always get the task execution first to prevent timing issues when retrieving it later