Skip to content

Commit 9f676ce

Browse files
committed
Revert "Fix accidently starting all onTaskType extensions when running any task; fixes microsoft#175821"
This reverts commit 31ed7f7.
1 parent 87ee421 commit 9f676ce

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
723723
});
724724
}
725725

726-
public async getTask(folder: IWorkspace | IWorkspaceFolder | string, identifier: string | ITaskIdentifier, compareId: boolean = false, type: string | undefined = undefined): Promise<Task | undefined> {
726+
public async getTask(folder: IWorkspace | IWorkspaceFolder | string, identifier: string | ITaskIdentifier, compareId: boolean = false): Promise<Task | undefined> {
727727
if (!(await this._trust())) {
728728
return;
729729
}
@@ -760,7 +760,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
760760
}
761761

762762
// We didn't find the task, so we need to ask all resolvers about it
763-
const map = await this._getGroupedTasks({ type });
763+
const map = await this._getGroupedTasks();
764764
let values = map.get(folder);
765765
values = values.concat(map.get(USER_TASKS_GROUP_KEY));
766766

@@ -1834,12 +1834,11 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
18341834
await this._updateWorkspaceTasks();
18351835
const taskFolder = task.getWorkspaceFolder();
18361836
const taskIdentifier = task.configurationProperties.identifier;
1837-
const taskType = CustomTask.is(task) ? task.customizes()?.type : (ContributedTask.is(task) ? task.type : undefined);
18381837
// Since we save before running tasks, the task may have changed as part of the save.
18391838
// However, if the TaskRunSource is not User, then we shouldn't try to fetch the task again
18401839
// since this can cause a new'd task to get overwritten with a provided task.
18411840
taskToRun = ((taskFolder && taskIdentifier && (runSource === TaskRunSource.User))
1842-
? await this.getTask(taskFolder, taskIdentifier, false, taskType) : task) ?? task;
1841+
? await this.getTask(taskFolder, taskIdentifier) : task) ?? task;
18431842
}
18441843
await ProblemMatcherRegistry.onReady();
18451844
const executeResult = runSource === TaskRunSource.Reconnect ? this._getTaskSystem().reconnect(taskToRun, resolver) : this._getTaskSystem().run(taskToRun, resolver);

0 commit comments

Comments
 (0)