@@ -24,16 +24,16 @@ function LocalBinary(){
24
24
return this . sourceURL ;
25
25
}
26
26
27
- if ( process . env . BINARY_DOWNLOAD_SOURCE_URL !== undefined && process . env . BINARY_DOWNLOAD_FALLBACK_ENABLED == " true" && this . parentRetries != 4 ) {
27
+ if ( process . env . BINARY_DOWNLOAD_SOURCE_URL !== undefined && process . env . BINARY_DOWNLOAD_FALLBACK_ENABLED == ' true' && this . parentRetries != 4 ) {
28
28
/* This is triggered from Local.js if there's an error executing the downloaded binary */
29
29
return process . env . BINARY_DOWNLOAD_SOURCE_URL ;
30
30
}
31
-
31
+
32
32
let cmd , opts ;
33
33
cmd = 'node' ;
34
34
opts = [ path . join ( __dirname , 'fetchDownloadSourceUrl.js' ) , this . key ] ;
35
-
36
- if ( retries == 4 || ( process . env . BINARY_DOWNLOAD_FALLBACK_ENABLED == " true" && this . parentRetries == 4 ) ) {
35
+
36
+ if ( retries == 4 || ( process . env . BINARY_DOWNLOAD_FALLBACK_ENABLED == ' true' && this . parentRetries == 4 ) ) {
37
37
opts . push ( true , this . downloadErrorMessage || process . env . BINARY_DOWNLOAD_ERROR_MESSAGE ) ;
38
38
} else {
39
39
opts . push ( false , null ) ;
@@ -47,7 +47,7 @@ function LocalBinary(){
47
47
} else if ( conf . useCaCertificate ) {
48
48
opts . push ( undefined , undefined , conf . useCaCertificate ) ;
49
49
}
50
-
50
+
51
51
const userAgent = [ packageName , version ] . join ( '/' ) ;
52
52
const env = Object . assign ( { 'USER_AGENT' : userAgent } , process . env ) ;
53
53
const obj = childProcess . spawnSync ( cmd , opts , { env : env } ) ;
@@ -59,7 +59,7 @@ function LocalBinary(){
59
59
let output = Buffer . from ( JSON . parse ( JSON . stringify ( obj . stderr ) ) . data ) . toString ( ) ;
60
60
throw ( output ) ;
61
61
}
62
- }
62
+ } ;
63
63
64
64
this . getDownloadPath = function ( conf , retries ) {
65
65
let sourceURL = this . getSourceUrl ( conf , retries ) + '/' ;
@@ -91,8 +91,8 @@ function LocalBinary(){
91
91
92
92
this . binaryDownloadError = function ( errorMessagePrefix , errorMessage ) {
93
93
console . error ( errorMessagePrefix , errorMessage ) ;
94
- this . downloadErrorMessage = errorMessagePrefix + " : " + errorMessage ;
95
- }
94
+ this . downloadErrorMessage = errorMessagePrefix + ' : ' + errorMessage ;
95
+ } ;
96
96
97
97
this . retryBinaryDownload = function ( conf , destParentDir , callback , retries , binaryPath ) {
98
98
var that = this ;
@@ -118,7 +118,7 @@ function LocalBinary(){
118
118
} catch ( e ) {
119
119
return console . error ( `Unable to fetch the source url to download the binary with error: ${ e } ` ) ;
120
120
}
121
-
121
+
122
122
console . log ( 'Downloading in sync' ) ;
123
123
var that = this ;
124
124
if ( ! this . checkPath ( destParentDir ) )
@@ -169,7 +169,7 @@ function LocalBinary(){
169
169
} catch ( e ) {
170
170
return console . error ( `Unable to fetch the source url to download the binary with error: ${ e } ` ) ;
171
171
}
172
-
172
+
173
173
var that = this ;
174
174
if ( ! this . checkPath ( destParentDir ) )
175
175
fs . mkdirSync ( destParentDir ) ;
0 commit comments