File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/vs/workbench/services/workspaces/common Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 3
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
4
*--------------------------------------------------------------------------------------------*/
5
5
6
- import { Emitter } from 'vs/base/common/event' ;
6
+ import { Emitter , Event } from 'vs/base/common/event' ;
7
7
import { splitName } from 'vs/base/common/labels' ;
8
8
import { Disposable , IDisposable , toDisposable } from 'vs/base/common/lifecycle' ;
9
9
import { LinkedList } from 'vs/base/common/linkedList' ;
@@ -756,9 +756,11 @@ export class WorkspaceTrustRequestService extends Disposable implements IWorkspa
756
756
return ;
757
757
}
758
758
759
- // Update storage, transition workspace, and resolve the promise
759
+ // Register one-time event handler to resolve the promise when workspace trust changed
760
+ Event . once ( this . workspaceTrustManagementService . onDidChangeTrust ) ( trusted => this . resolveWorkspaceTrustRequest ( trusted ) ) ;
761
+
762
+ // Update storage, transition workspace state
760
763
await this . workspaceTrustManagementService . setWorkspaceTrust ( trusted ) ;
761
- this . resolveWorkspaceTrustRequest ( trusted ) ;
762
764
}
763
765
764
766
async requestWorkspaceTrust ( options ?: WorkspaceTrustRequestOptions ) : Promise < boolean | undefined > {
You can’t perform that action at this time.
0 commit comments