Skip to content

Commit 42e9acc

Browse files
committed
no need to explicitly get workspace tasks as they're always refreshed now
1 parent 075cf4a commit 42e9acc

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
374374
this._tasksReconnected = true;
375375
return;
376376
}
377-
this.getWorkspaceTasks().then(async () => {
377+
this.getWorkspaceTasks(TaskRunSource.Reconnect).then(async () => {
378378
this._tasksReconnected = await this._reconnectTasks();
379379
});
380380
}
@@ -2349,11 +2349,11 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
23492349
return { workspaceFolder, set: undefined, configurations: undefined, hasErrors: false };
23502350
}
23512351

2352-
private async _computeTasksForSingleConfig(workspaceFolder: IWorkspaceFolder | undefined, config: TaskConfig.IExternalTaskRunnerConfiguration | undefined, runSource: TaskRunSource, custom: CustomTask[], customized: IStringDictionary<ConfiguringTask>, source: TaskConfig.TaskConfigSource, isRecentTask: boolean = false): Promise<boolean> {
2353-
if (!config || !workspaceFolder) {
2352+
private async _computeTasksForSingleConfig(workspaceFolder: IWorkspaceFolder, config: TaskConfig.IExternalTaskRunnerConfiguration | undefined, runSource: TaskRunSource, custom: CustomTask[], customized: IStringDictionary<ConfiguringTask>, source: TaskConfig.TaskConfigSource, isRecentTask: boolean = false): Promise<boolean> {
2353+
if (!config) {
23542354
return false;
23552355
}
2356-
const taskSystemInfo: ITaskSystemInfo | undefined = workspaceFolder ? this._getTaskSystemInfo(workspaceFolder.uri.scheme) : undefined;
2356+
const taskSystemInfo: ITaskSystemInfo | undefined = this._getTaskSystemInfo(workspaceFolder.uri.scheme);
23572357
const problemReporter = new ProblemReporter(this._outputChannel);
23582358
if (!taskSystemInfo) {
23592359
problemReporter.fatal(nls.localize('TaskSystem.workspaceFolderError', 'Workspace folder was undefined'));
@@ -2746,7 +2746,6 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
27462746
}
27472747

27482748
private async _runTaskCommand(filter?: string | ITaskIdentifier): Promise<void> {
2749-
await this.getWorkspaceTasks();
27502749
if (!filter) {
27512750
return this._doRunTaskCommand();
27522751
}
@@ -2904,7 +2903,6 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
29042903
title: strings.fetching
29052904
};
29062905
const promise = (async () => {
2907-
await this.getWorkspaceTasks();
29082906
let taskGroupTasks: (Task | ConfiguringTask)[] = [];
29092907

29102908
async function runSingleTask(task: Task | undefined, problemMatcherOptions: IProblemMatcherRunOptions | undefined, that: AbstractTaskService) {

0 commit comments

Comments
 (0)