File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -87,11 +87,25 @@ function LocalBinary(){
87
87
} ) ;
88
88
}
89
89
90
- const cmd = `curl` ;
91
- const opts = [ '-o' , binaryPath , options . href ] ;
90
+ const osPlatform = os . platform ( ) ;
91
+ const osVersion = parseInt ( os . release ( ) ) ;
92
92
93
- if ( conf . proxyHost && conf . proxyPort ) {
94
- opts . push ( '--proxy' , `${ conf . proxyHost } :${ conf . proxyPort } ` ) ;
93
+ let cmd , opts ;
94
+
95
+ if ( osPlatform . includes ( 'win' ) && osVersion < 10 ) {
96
+ cmd = 'wget' ;
97
+ opts = [ ] ;
98
+ if ( conf . proxyHost && conf . proxyPort ) {
99
+ opts . push ( '-e' , `https_proxy=${ conf . proxyHost } :${ conf . proxyPort } ` , "--no-check-certificate" ) ;
100
+ }
101
+ opts . push ( '-O' , binaryPath , options . href ) ;
102
+ } else {
103
+ cmd = `curl` ;
104
+ opts = [ '-o' , binaryPath , options . href ] ;
105
+
106
+ if ( conf . proxyHost && conf . proxyPort ) {
107
+ opts . push ( '--proxy' , `${ conf . proxyHost } :${ conf . proxyPort } ` ) ;
108
+ }
95
109
}
96
110
97
111
try {
You can’t perform that action at this time.
0 commit comments