Skip to content

Commit bc40888

Browse files
committed
Run submodule updates in sequence rather than parallel
Experiencing issues with config locks on electron_npg_automator. This might potentially be the cause.
1 parent c5e3b25 commit bc40888

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

lifecycleScripts/submodules/index.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff 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
};

0 commit comments

Comments
 (0)