File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
src/vs/workbench/contrib/tasks/browser Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2788,10 +2788,14 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
2788
2788
}
2789
2789
2790
2790
private async _trust ( ) : Promise < boolean > {
2791
- return ( await this . _workspaceTrustRequestService . requestWorkspaceTrust (
2792
- {
2793
- message : nls . localize ( 'TaskService.requestTrust' , "Listing and running tasks requires that some of the files in this workspace be executed as code." )
2794
- } ) ) === true ;
2791
+ await this . _workspaceTrustManagementService . workspaceTrustInitialized ;
2792
+ if ( ! this . _workspaceTrustManagementService . isWorkspaceTrusted ( ) ) {
2793
+ return ( await this . _workspaceTrustRequestService . requestWorkspaceTrust (
2794
+ {
2795
+ message : nls . localize ( 'TaskService.requestTrust' , "Listing and running tasks requires that some of the files in this workspace be executed as code." )
2796
+ } ) ) === true ;
2797
+ }
2798
+ return true ;
2795
2799
}
2796
2800
2797
2801
private async _runTaskCommand ( filter ?: any | { type ?: string ; task ?: string } ) : Promise < void > {
You can’t perform that action at this time.
0 commit comments