File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11language : node_js
22node_js :
3+ - ' 10'
34 - ' 8'
45 - ' 6'
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ const importLazy = require('import-lazy')(require);
55
66const binCheck = importLazy ( 'bin-check' ) ;
77const binVersionCheck = importLazy ( 'bin-version-check' ) ;
8- const Download = importLazy ( 'download' ) ;
8+ const download = importLazy ( 'download' ) ;
99const osFilterObj = importLazy ( 'os-filter-obj' ) ;
1010
1111/**
@@ -184,21 +184,21 @@ module.exports = class BinWrapper {
184184 */
185185 download ( cb ) {
186186 const files = osFilterObj ( this . src ( ) || [ ] ) ;
187- const download = new Download ( {
188- extract : true ,
189- mode : '755' ,
190- strip : this . options . strip
191- } ) ;
187+ const urls = [ ] ;
192188
193189 if ( files . length === 0 ) {
194190 cb ( new Error ( 'No binary found matching your system. It\'s probably not supported.' ) ) ;
195191 return ;
196192 }
197193
198- files . forEach ( file => download . get ( file . url ) ) ;
194+ files . forEach ( file => urls . push ( file . url ) ) ;
199195
200- download
201- . dest ( this . dest ( ) )
202- . run ( cb ) ;
196+ Promise . all ( urls . map ( url => download ( url , this . dest ( ) , {
197+ extract : true ,
198+ mode : '755' ,
199+ strip : this . options . strip
200+ } ) ) ) . then ( ( ) => {
201+ cb ( ) ;
202+ } ) ;
203203 }
204204} ;
Original file line number Diff line number Diff line change 2727 "dependencies" : {
2828 "bin-check" : " ^4.1.0" ,
2929 "bin-version-check" : " ^3.0.0" ,
30- "download" : " ^4.0 .0" ,
30+ "download" : " ^7.1 .0" ,
3131 "import-lazy" : " ^3.1.0" ,
3232 "os-filter-obj" : " ^2.0.0"
3333 },
3434 "devDependencies" : {
3535 "ava" : " *" ,
36- "nock" : " ^9.2.3 " ,
36+ "nock" : " ^9.4.2 " ,
3737 "path-exists" : " ^3.0.0" ,
3838 "pify" : " ^3.0.0" ,
39- "rimraf" : " ^2.2.8 " ,
39+ "rimraf" : " ^2.6.2 " ,
4040 "tempy" : " ^0.2.1" ,
4141 "xo" : " *"
4242 }
You can’t perform that action at this time.
0 commit comments