api resolves immediately trust state in non-modal

This commit is contained in:
SteVen Batten
2021-04-19 08:52:45 -07:00
parent dec167076b
commit 86157f0d55
2 changed files with 5 additions and 1 deletions

View File

@@ -563,7 +563,8 @@ export class ExtHostWorkspace implements ExtHostWorkspaceShape, IExtHostWorkspac
}
requestWorkspaceTrust(options?: vscode.WorkspaceTrustRequestOptions): Promise<boolean> {
return this._proxy.$requestWorkspaceTrust(options);
const promise = this._proxy.$requestWorkspaceTrust(options);
return options?.modal ? promise : Promise.resolve(this._trusted);
}
$onDidReceiveWorkspaceTrust(): void {