Skip to content

Commit 4f1df73

Browse files
committed
when supported executions change, make sure to unset the promise so they get re-evaluated
1 parent 42e9acc commit 4f1df73

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,8 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
362362
const processContext = ProcessExecutionSupportedContext.bindTo(this._contextKeyService);
363363
processContext.set(process && !isVirtual);
364364
}
365+
// update tasks so an incomplete list isn't returned when getWorkspaceTasks is called
366+
this._workspaceTasksPromise = undefined;
365367
this._onDidRegisterSupportedExecutions.fire();
366368
}
367369

@@ -2201,6 +2203,9 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
22012203
}
22022204
await this._waitForSupportedExecutions;
22032205
await this._whenTaskSystemReady;
2206+
if (this._workspaceTasksPromise) {
2207+
return this._workspaceTasksPromise;
2208+
}
22042209
return this._updateWorkspaceTasks(runSource);
22052210
}
22062211

0 commit comments

Comments
 (0)