File tree Expand file tree Collapse file tree 1 file changed +18
-17
lines changed Expand file tree Collapse file tree 1 file changed +18
-17
lines changed Original file line number Diff line number Diff line change @@ -14,24 +14,25 @@ try {
1414    const  subcommand  =  args [ firstPositionalArgIndex ] ; 
1515    const  subcommandWithArgs  =  args . slice ( firstPositionalArgIndex ) ; 
1616
17-     if  ( 
18-       subcommand  ===  "build"  || 
19-       subcommand  ===  "watch"  || 
20-       subcommand  ===  "clean"  || 
21-       subcommand  ===  "compiler-args"  || 
22-       subcommand  ===  "format" 
23-     )  { 
24-       child_process . execFileSync ( 
25-         rescript_exe , 
26-         [ ...subcommandWithArgs ,  "--bsc-path" ,  bsc_exe ] , 
27-         { 
17+     switch  ( subcommand )  { 
18+       case  "build" :
19+       case  "watch" :
20+       case  "clean" :
21+       case  "compiler-args" :
22+       case  "format" :
23+         child_process . execFileSync ( 
24+           rescript_exe , 
25+           [ ...subcommandWithArgs ,  "--bsc-path" ,  bsc_exe ] , 
26+           { 
27+             stdio : "inherit" , 
28+           } , 
29+         ) ; 
30+         break ; 
31+       default :
32+         child_process . execFileSync ( rescript_exe ,  [ ...args ] ,  { 
2833          stdio : "inherit" , 
29-         } , 
30-       ) ; 
31-     }  else  { 
32-       child_process . execFileSync ( rescript_exe ,  [ ...args ] ,  { 
33-         stdio : "inherit" , 
34-       } ) ; 
34+         } ) ; 
35+         break ; 
3536    } 
3637  }  else  { 
3738    // no subcommand means build subcommand 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments