File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 11use anyhow:: { Context , Error , Result } ;
2+ use helix_loader:: trust_db:: Trust ;
23use helix_loader:: { trust_db, VERSION_AND_GIT_HASH } ;
34use helix_term:: application:: Application ;
45use helix_term:: args:: Args ;
56use helix_term:: config:: { Config , ConfigLoadError } ;
7+ use helix_view:: editor:: WorkspaceTrust ;
68
79fn setup_logging ( verbosity : u64 ) -> Result < ( ) > {
810 let mut base_config = fern:: Dispatch :: new ( ) ;
@@ -118,8 +120,13 @@ FLAGS:
118120 }
119121 } ;
120122
121- let use_local_config =
122- trust_db:: is_workspace_trusted ( helix_loader:: find_workspace ( ) . 0 ) ?. unwrap_or_default ( ) ;
123+ let use_local_config = match config. editor . workspace_trust {
124+ WorkspaceTrust :: Always => true ,
125+ WorkspaceTrust :: Never => false ,
126+ WorkspaceTrust :: Manual | WorkspaceTrust :: Ask => {
127+ trust_db:: is_workspace_trusted ( helix_loader:: find_workspace ( ) . 0 ) ?. unwrap_or_default ( )
128+ }
129+ } ;
123130
124131 if args. health {
125132 if let Err ( err) = helix_term:: health:: print_health ( args. health_arg , use_local_config) {
You can’t perform that action at this time.
0 commit comments