File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
lifecycleScripts/submodules Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -61,17 +61,18 @@ module.exports = function submodules() {
6161 console . warn ( "\nThey will not be updated." ) ;
6262 }
6363
64- return Promise . all ( statuses
64+ return statuses
6565 . filter ( function ( status ) {
6666 return ! status . onNewCommit ;
6767 } )
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 ( "[nodegit] Initializing submodule" , submoduleToUpdate . name ) ;
72+ return exec (
73+ "git submodule update --init --recursive " + submoduleToUpdate . name
74+ ) ;
75+ } ) ;
76+ } , Promise . resolve ( ) ) ;
7677 } ) ;
7778} ;
You can’t perform that action at this time.
0 commit comments