File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -459,19 +459,24 @@ export default class SocketDaemon extends Daemon {
459
459
* ]
460
460
* }
461
461
*/
462
- _upload ( uploadPayload , uploadCommandInfo ) {
462
+ async _upload ( uploadPayload , uploadCommandInfo ) {
463
+ // Wait for tools to be installed
463
464
if ( Array . isArray ( uploadCommandInfo . tools ) ) {
465
+ const promises = [ ] ;
466
+
464
467
uploadCommandInfo . tools . forEach ( tool => {
465
468
if ( this . v2 ) {
466
469
this . downloading . next ( { status : this . DOWNLOAD_IN_PROGRESS } ) ;
467
- this . v2 . installTool ( tool ) . then ( ( ) => {
470
+ promises . push ( this . v2 . installTool ( tool ) . then ( ( ) => {
468
471
this . downloading . next ( { status : this . DOWNLOAD_DONE } ) ;
469
- } ) ;
472
+ } ) ) ;
470
473
}
471
474
else {
472
475
this . downloadTool ( tool . name , tool . version , tool . packager ) ;
473
476
}
474
477
} ) ;
478
+
479
+ await Promise . all ( promises ) ;
475
480
}
476
481
477
482
const socketParameters = {
You can’t perform that action at this time.
0 commit comments