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 {
14
14
const subcommand = args [ firstPositionalArgIndex ] ;
15
15
const subcommandWithArgs = args . slice ( firstPositionalArgIndex ) ;
16
16
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 ] , {
28
33
stdio : "inherit" ,
29
- } ,
30
- ) ;
31
- } else {
32
- child_process . execFileSync ( rescript_exe , [ ...args ] , {
33
- stdio : "inherit" ,
34
- } ) ;
34
+ } ) ;
35
+ break ;
35
36
}
36
37
} else {
37
38
// no subcommand means build subcommand
You can’t perform that action at this time.
0 commit comments