File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 2
2
var path = require ( "path" ) ;
3
3
var spawn = require ( "child_process" ) . spawn ;
4
4
var fs = require ( "fs" ) ;
5
- var packageInfo = require ( path . join ( __dirname , ".." , "package.json" ) ) ;
6
- var package = require ( path . join ( __dirname , ".." , packageInfo . main ) ) ;
7
5
8
6
var os = process . env . BINWRAP_PLATFORM || process . platform ;
9
7
var arch = process . env . BINWRAP_ARCH || process . arch ;
@@ -34,6 +32,10 @@ if (fs.existsSync(binPath)) {
34
32
execBin ( ) ;
35
33
} else {
36
34
console . error ( "INFO: Running " + path . basename ( __filename ) + " for the first time; downloading the actual binary" ) ;
35
+
36
+ var packageInfo = require ( path . join ( __dirname , ".." , "package.json" ) ) ;
37
+ var package = require ( path . join ( __dirname , ".." , packageInfo . main ) ) ;
38
+
37
39
package . install ( unpackedBinPath , os , arch ) . then ( function ( result ) {
38
40
execBin ( ) ;
39
41
} , function ( err ) {
You can’t perform that action at this time.
0 commit comments