From 3ee7bdd57515c3ffe534d4d3ed7e9e292db15b82 Mon Sep 17 00:00:00 2001 From: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Mon, 14 Jun 2021 10:21:19 +0200 Subject: [PATCH] #126057 --- .../workspaces/common/workspaceTrust.ts | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/services/workspaces/common/workspaceTrust.ts b/src/vs/workbench/services/workspaces/common/workspaceTrust.ts index 1dfd7b21b7d..7107899cb20 100644 --- a/src/vs/workbench/services/workspaces/common/workspaceTrust.ts +++ b/src/vs/workbench/services/workspaces/common/workspaceTrust.ts @@ -129,15 +129,17 @@ export class WorkspaceTrustManagementService extends Disposable implements IWork private initializeWorkspaceTrust(): void { // Resolve canonical Uris - this.resolveCanonicalUris().then(async () => { - this._canonicalUrisResolved = true; - await this.updateWorkspaceTrust(); - - this._workspaceResolvedPromiseResolve(); - if (!this.environmentService.remoteAuthority) { - this._workspaceTrustInitializedPromiseResolve(); - } - }); + this.resolveCanonicalUris() + .then(async () => { + this._canonicalUrisResolved = true; + await this.updateWorkspaceTrust(); + }) + .finally(() => { + this._workspaceResolvedPromiseResolve(); + if (!this.environmentService.remoteAuthority) { + this._workspaceTrustInitializedPromiseResolve(); + } + }); // Remote - resolve remote authority if (this.environmentService.remoteAuthority) { @@ -145,7 +147,8 @@ export class WorkspaceTrustManagementService extends Disposable implements IWork .then(async result => { this._remoteAuthority = result; await this.updateWorkspaceTrust(); - + }) + .finally(() => { this._workspaceTrustInitializedPromiseResolve(); }); }