File tree 1 file changed +11
-6
lines changed
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 1
1
//@ts -check
2
2
var cp = require ( "child_process" ) ;
3
-
4
3
var path = require ( "path" ) ;
4
+ var fs = require ( "fs" ) ;
5
5
6
6
var installGlobal = false ;
7
7
var ounitTest = false ;
@@ -41,8 +41,6 @@ if (all) {
41
41
bsbTest = true ;
42
42
}
43
43
44
- var fs = require ( "fs" ) ;
45
-
46
44
function init ( ) {
47
45
var vendorOCamlPath = path . join (
48
46
__dirname ,
@@ -61,9 +59,7 @@ function init() {
61
59
}
62
60
}
63
61
64
- function main ( ) {
65
- init ( ) ;
66
-
62
+ function runTests ( ) {
67
63
// when binary was prebuilt, there can be no ocaml installation
68
64
// var output =
69
65
// cp.execSync('which ocaml', { encoding: 'ascii' })
@@ -156,4 +152,13 @@ function main() {
156
152
}
157
153
}
158
154
155
+ function main ( ) {
156
+ try {
157
+ init ( ) ;
158
+ runTests ( ) ;
159
+ } catch ( err ) {
160
+ console . error ( err ) ;
161
+ process . exit ( 2 ) ;
162
+ }
163
+ }
159
164
main ( ) ;
You can’t perform that action at this time.
0 commit comments