Skip to content

Commit a6f2e53

Browse files
committed
compute realpath ofr binaries
1 parent 636c929 commit a6f2e53

File tree

1 file changed

+24
-11
lines changed

1 file changed

+24
-11
lines changed

cli/common/bins.js

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,28 @@ try {
2727
throw new Error(`Platform ${target} is not supported!`);
2828
}
2929

30+
let binPaths = mod.binPaths;
31+
try {
32+
binPaths = {
33+
bsb_helper_exe: fs.realpathSync(binPaths.bsb_helper_exe),
34+
bsc_exe: fs.realpathSync(binPath.bsc_exe),
35+
ninja_exe: fs.realpathSync(binPath.ninja_exe),
36+
rescript_editor_analysis_exe: fs.realpathSync(rescript_editor_analysis_exe),
37+
rescript_tools_exe: fs.realpathSync(rescript_tools_exe),
38+
rescript_exe: fs.realpathSync(rescript_exe),
39+
rewatch_exe: fs.realpathSync(rewatch_exe),
40+
}
41+
} catch (err) {
42+
console.warn("Cannot populate the realpath of a binary, some tests may fails", err);
43+
}
44+
45+
export const platformDir = mod.binDir;
3046
export const {
31-
binDir: platformDir,
32-
binPaths: {
33-
bsb_helper_exe,
34-
bsc_exe,
35-
ninja_exe,
36-
rescript_editor_analysis_exe,
37-
rescript_tools_exe,
38-
rescript_exe,
39-
rewatch_exe,
40-
},
41-
} = mod;
47+
bsb_helper_exe,
48+
bsc_exe,
49+
ninja_exe,
50+
rescript_editor_analysis_exe,
51+
rescript_tools_exe,
52+
rescript_exe,
53+
rewatch_exe,
54+
} = binPaths;

0 commit comments

Comments
 (0)