Skip to content

Commit d8dcc0f

Browse files
author
John Haley
committed
Fix submodules for the "no-prebuilt install from npm" case
1 parent 5425d95 commit d8dcc0f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lifecycleScripts/submodules/getStatus.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ var exec = require(path.join(rootDir, "./utils/execPromise"));
55
module.exports = function getStatus() {
66
return exec("git submodule status", { cwd: rootDir})
77
.then(function(stdout) {
8+
if (!stdout) {
9+
// In the case where we pull from npm they pre-init the submoduels for
10+
// us and `git submodule status` returns empty-string. In that case
11+
// we'll just assume that we're good.
12+
return Promise.resolve([]);
13+
}
14+
815
function getStatusPromiseFromLine(line) {
916
var lineSections = line.trim().split(" ");
1017
var onNewCommit = !!~lineSections[0].indexOf("+");

0 commit comments

Comments
 (0)