Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lifecycleScripts/submodules/getStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ var exec = require(path.join(rootDir, "./utils/execPromise"));
module.exports = function getStatus() {
return exec("git submodule status", { cwd: rootDir})
.then(function(stdout) {
if (!stdout) {
// In the case where we pull from npm they pre-init the submodules for
// us and `git submodule status` returns empty-string. In that case
// we'll just assume that we're good.
return Promise.resolve([]);
}

function getStatusPromiseFromLine(line) {
var lineSections = line.trim().split(" ");
var onNewCommit = !!~lineSections[0].indexOf("+");
Expand Down