File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -103,14 +103,17 @@ function determineConfigSource(
103103
104104    if  ( savedUri )  { 
105105      if  ( savedUri . startsWith ( "file:" ) )  { 
106+         let  exists  =  false ;  // wrote like this for nested depth linting rule lol 
106107        try  { 
107-           if  ( fs . existsSync ( fileURLToPath ( savedUri ) ) )  { 
108-             return  {  type : "saved-uri" ,  uri : savedUri  } ; 
109-           }  else  { 
110-             logger . warn ( "Saved config URI does not exist: "  +  savedUri ) ; 
111-           } 
108+           const  filepath  =  fileURLToPath ( savedUri ) ; 
109+           exists  =  fs . existsSync ( filepath ) ; 
112110        }  catch  ( e )  { 
113-           logger . warn ( "Invalid saved file URI "  +  savedUri ) ; 
111+           logger . warn ( "Invalid saved file URI "  +  savedUri ,  e ) ; 
112+         } 
113+         if  ( exists )  { 
114+           return  {  type : "saved-uri" ,  uri : savedUri  } ; 
115+         }  else  { 
116+           logger . warn ( "Saved config URI does not exist: "  +  savedUri ) ; 
114117        } 
115118      }  else  { 
116119        // slug 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments