File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed 
src/databricks/labs/lakebridge Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -235,16 +235,20 @@ def _validate_transpiler_config_path(transpiler_config_path: str, msg: str) -> N
235235    def  use_transpiler_config_path (self , transpiler_config_path : str  |  None ) ->  None :
236236        if  transpiler_config_path  is  not None :
237237            logger .debug (f"Setting transpiler_config_path to: { transpiler_config_path !r}  )
238-             # Switch is installed inside "/Users/<>/.lakebridge/transpilers/Switch/lsp/config.yml 
239-             if  Path (transpiler_config_path ).parent .parent .name  ==  "Switch" :
240-                 msg  =  "Switch transpiler is not supported through `transpile` run `llm-transpile` instead." 
241-                 raise_validation_exception (msg )
242238            self ._validate_transpiler_config_path (
243239                transpiler_config_path ,
244240                f"Invalid path for '--transpiler-config-path', does not exist: { transpiler_config_path }  ,
245241            )
246242            self ._config  =  dataclasses .replace (self ._config , transpiler_config_path = transpiler_config_path )
247243
244+         # Switch is installed inside "/Users/<>/.lakebridge/transpilers/Switch/lsp/config.yml 
245+         if  (
246+             self ._config .transpiler_config_path  is  not None 
247+             and  Path (self ._config .transpiler_config_path ).parent .parent .name  ==  "Switch" 
248+         ):
249+             msg  =  "Switch transpiler is not supported through `transpile` run `llm-transpile` instead." 
250+             raise  RuntimeError (msg )
251+ 
248252    def  use_source_dialect (self , source_dialect : str  |  None ) ->  None :
249253        if  source_dialect  is  not None :
250254            # Defer validation: depends on the transpiler config path, we'll deal with this later. 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments