File tree Expand file tree Collapse file tree 1 file changed +13
-16
lines changed Expand file tree Collapse file tree 1 file changed +13
-16
lines changed Original file line number Diff line number Diff line change @@ -57,22 +57,19 @@ impl CommandDiscovery {
5757        let  mut  using_custom_path = false ; 
5858
5959        // try DSC_RESOURCE_PATH env var first otherwise use PATH 
60-         let  path_env = match  env:: var_os ( "DSC_RESOURCE_PATH" )  { 
61-             Some ( value)  => { 
62-                 debug ! ( "Using DSC_RESOURCE_PATH: {:?}" ,  value. to_string_lossy( ) ) ; 
63-                 using_custom_path = true ; 
64-                 value
65-             } , 
66-             None  => { 
67-                 trace ! ( "DSC_RESOURCE_PATH not set, trying PATH" ) ; 
68-                 match  env:: var_os ( "PATH" )  { 
69-                     Some ( value)  => { 
70-                         debug ! ( "Using PATH: {:?}" ,  value. to_string_lossy( ) ) ; 
71-                         value
72-                     } 
73-                     None  => { 
74-                         return  Err ( DscError :: Operation ( "Failed to get PATH environment variable" . to_string ( ) ) ) ; 
75-                     } 
60+         let  path_env = if  let  Some ( value)  = env:: var_os ( "DSC_RESOURCE_PATH" )  { 
61+             debug ! ( "Using DSC_RESOURCE_PATH: {:?}" ,  value. to_string_lossy( ) ) ; 
62+             using_custom_path = true ; 
63+             value
64+         }  else  { 
65+             trace ! ( "DSC_RESOURCE_PATH not set, trying PATH" ) ; 
66+             match  env:: var_os ( "PATH" )  { 
67+                 Some ( value)  => { 
68+                     debug ! ( "Using PATH: {:?}" ,  value. to_string_lossy( ) ) ; 
69+                     value
70+                 } , 
71+                 None  => { 
72+                     return  Err ( DscError :: Operation ( "Failed to get PATH environment variable" . to_string ( ) ) ) ; 
7673                } 
7774            } 
7875        } ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments