Make sure that task definition is not changed in resolved task

This commit is contained in:
Gabriel DeBacker
2019-07-30 08:20:29 -07:00
parent 506d55d171
commit 9bbf3f25d5

View File

@@ -741,6 +741,10 @@ export class ExtHostTask implements ExtHostTaskShape {
throw new Error('Unexpected: Task cannot be resolved.');
}
if (resolvedTask.definition !== task.definition) {
throw new Error('Unexpected: A task definition cannot be modified when resolving a task.');
}
if (CustomExecutionDTO.is(resolvedTaskDTO.execution)) {
await this.addCustomExecution(resolvedTaskDTO, <vscode.Task2>resolvedTask);
}