File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed
lifecycleScripts/submodules Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -61,17 +61,22 @@ module.exports = function submodules() {
61
61
console . warn ( "\nThey will not be updated." ) ;
62
62
}
63
63
64
- return Promise . all ( statuses
64
+ return statuses
65
65
. filter ( function ( status ) {
66
66
return ! status . onNewCommit ;
67
67
} )
68
- . map ( function ( submoduleToUpdate ) {
69
- console . log ( "[nodegit] Initializing submodules" ) ;
70
-
71
- return exec (
72
- "git submodule update --init --recursive " + submoduleToUpdate . name
73
- ) ;
74
- } )
75
- ) ;
68
+ . reduce ( function ( chainPromise , submoduleToUpdate ) {
69
+ return chainPromise
70
+ . then ( function ( ) {
71
+ console . log (
72
+ "[nodegit] Initializing submodule" ,
73
+ submoduleToUpdate . name
74
+ ) ;
75
+ return exec (
76
+ "git submodule update --init --recursive " +
77
+ submoduleToUpdate . name
78
+ ) ;
79
+ } ) ;
80
+ } , Promise . resolve ( ) ) ;
76
81
} ) ;
77
82
} ;
You can’t perform that action at this time.
0 commit comments