Skip to content

Commit a7844a6

Browse files
authored
Other files don't open when launched with an unsaved workspace (fix microsoft#205453) (microsoft#205517)
* Other files don't open when launched with an unsaved workspace (fix microsoft#205453) * polish
1 parent 378b4c9 commit a7844a6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/vs/workbench/contrib/workspace/browser/workspace.contribution.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,12 @@ export class WorkspaceTrustRequestHandler extends Disposable implements IWorkben
103103
return !isSingleFolderWorkspaceIdentifier(toWorkspaceIdentifier(this.workspaceContextService.getWorkspace()));
104104
}
105105

106-
private async registerListeners(): Promise<void> {
107-
await this.workspaceTrustManagementService.workspaceResolved;
106+
private registerListeners(): void {
108107

109108
// Open files trust request
110109
this._register(this.workspaceTrustRequestService.onDidInitiateOpenFilesTrustRequest(async () => {
110+
await this.workspaceTrustManagementService.workspaceResolved;
111+
111112
// Details
112113
const markdownDetails = [
113114
this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY ?
@@ -148,6 +149,8 @@ export class WorkspaceTrustRequestHandler extends Disposable implements IWorkben
148149

149150
// Workspace trust request
150151
this._register(this.workspaceTrustRequestService.onDidInitiateWorkspaceTrustRequest(async requestOptions => {
152+
await this.workspaceTrustManagementService.workspaceResolved;
153+
151154
// Title
152155
const message = this.useWorkspaceLanguage ?
153156
localize('workspaceTrust', "Do you trust the authors of the files in this workspace?") :

0 commit comments

Comments
 (0)