File tree 1 file changed +31
-11
lines changed
1 file changed +31
-11
lines changed Original file line number Diff line number Diff line change 1
1
// @ts -check
2
2
3
+ import * as fs from "node:fs" ;
4
+
3
5
/**
4
6
* @typedef {{
5
7
* binDir: string,
@@ -27,15 +29,33 @@ try {
27
29
throw new Error ( `Platform ${ target } is not supported!` ) ;
28
30
}
29
31
32
+ let binPaths = mod . binPaths ;
33
+ try {
34
+ binPaths = {
35
+ bsb_helper_exe : fs . realpathSync ( binPaths . bsb_helper_exe ) ,
36
+ bsc_exe : fs . realpathSync ( binPaths . bsc_exe ) ,
37
+ ninja_exe : fs . realpathSync ( binPaths . ninja_exe ) ,
38
+ rescript_editor_analysis_exe : fs . realpathSync (
39
+ binPaths . rescript_editor_analysis_exe ,
40
+ ) ,
41
+ rescript_tools_exe : fs . realpathSync ( binPaths . rescript_tools_exe ) ,
42
+ rescript_exe : fs . realpathSync ( binPaths . rescript_exe ) ,
43
+ rewatch_exe : fs . realpathSync ( binPaths . rewatch_exe ) ,
44
+ } ;
45
+ } catch ( err ) {
46
+ console . warn (
47
+ "Cannot populate the realpath of a binary, some tests may fails" ,
48
+ err ,
49
+ ) ;
50
+ }
51
+
52
+ export const platformDir = mod . binDir ;
30
53
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 ;
54
+ bsb_helper_exe,
55
+ bsc_exe,
56
+ ninja_exe,
57
+ rescript_editor_analysis_exe,
58
+ rescript_tools_exe,
59
+ rescript_exe,
60
+ rewatch_exe,
61
+ } = binPaths ;
You can’t perform that action at this time.
0 commit comments