From 9bbf3f25d50ba79b5c40b4ed79adf482b2356925 Mon Sep 17 00:00:00 2001 From: Gabriel DeBacker Date: Tue, 30 Jul 2019 08:20:29 -0700 Subject: [PATCH] Make sure that task definition is not changed in resolved task --- src/vs/workbench/api/node/extHostTask.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index e71fb134985..57105c22813 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -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, resolvedTask); } -- GitLab