File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,17 @@ export let findBscBinary = (
65
65
return findBinary ( binaryDirPath , c . bscBinName ) ;
66
66
} ;
67
67
68
+ export let executeNodeWrapperSync = (
69
+ buildPath : p . DocumentUri ,
70
+ args : string [ ]
71
+ ) => {
72
+ if ( process . platform === "win32" ) {
73
+ return childProcess . execSync ( `"${ buildPath } ".cmd ${ args . join ( " " ) } ` ) ;
74
+ } else {
75
+ return childProcess . execFileSync ( buildPath , args ) ;
76
+ }
77
+ } ;
78
+
68
79
type execResult =
69
80
| {
70
81
kind : "success" ;
@@ -89,7 +100,7 @@ export let formatCode = (
89
100
// It will try to use the user formatting binary.
90
101
// If not, use the one we ship with the analysis binary in the extension itself.
91
102
if ( bscPath != null ) {
92
- let result = childProcess . execFileSync ( bscPath , [
103
+ let result = executeNodeWrapperSync ( bscPath , [
93
104
"-color" ,
94
105
"never" ,
95
106
"-format" ,
You can’t perform that action at this time.
0 commit comments