Skip to content

Commit d21d7d9

Browse files
authored
1 parent d9b1d6b commit d21d7d9

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

src/vs/workbench/services/workspaces/common/workspaceTrust.ts

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -126,23 +126,26 @@ export class WorkspaceTrustManagementService extends Disposable implements IWork
126126
private registerListeners(): void {
127127

128128
// Resolve the workspace uris and resolve the initialization promise
129-
this.resolveCanonicalWorkspaceUris().then(async () => {
130-
this._initialized = true;
131-
await this.updateWorkspaceTrust();
132-
133-
this._workspaceResolvedPromiseResolve();
134-
if (!this.environmentService.remoteAuthority) {
135-
this._workspaceTrustInitializedPromiseResolve();
136-
}
137-
});
129+
this.resolveCanonicalWorkspaceUris()
130+
.then(async () => {
131+
this._initialized = true;
132+
await this.updateWorkspaceTrust();
133+
})
134+
.finally(() => {
135+
this._workspaceResolvedPromiseResolve();
136+
if (!this.environmentService.remoteAuthority) {
137+
this._workspaceTrustInitializedPromiseResolve();
138+
}
139+
});
138140

139141
// Remote - resolve remote authority
140142
if (this.environmentService.remoteAuthority) {
141143
this.remoteAuthorityResolverService.resolveAuthority(this.environmentService.remoteAuthority)
142144
.then(async result => {
143145
this._remoteAuthority = result;
144146
await this.updateWorkspaceTrust();
145-
147+
})
148+
.finally(() => {
146149
this._workspaceTrustInitializedPromiseResolve();
147150
});
148151
}

0 commit comments

Comments
 (0)