better fix

This commit is contained in:
meganrogge
2023-09-19 12:28:54 -07:00
parent 52b0ec4478
commit 33bbfac7ec
@@ -28,9 +28,10 @@ export class RunAutomaticTasks extends Disposable implements IWorkbenchContribut
@IWorkspaceTrustManagementService private readonly _workspaceTrustManagementService: IWorkspaceTrustManagementService,
@ILogService private readonly _logService: ILogService) {
super();
this._taskService.onDidReconnectToTasks((() => this._tryRunTasks()));
if (this._taskService.isReconnected) {
this._tryRunTasks();
} else {
this._register(Event.once(this._taskService.onDidReconnectToTasks)(() => this._tryRunTasks()));
}
this._register(this._workspaceTrustManagementService.onDidChangeTrust(async trusted => {
if (trusted) {