From d8dcc0f8fdcd0c8f662dddbb6cae59cea267b34b Mon Sep 17 00:00:00 2001 From: John Haley Date: Mon, 9 May 2016 10:35:11 -0700 Subject: [PATCH 1/2] Fix submodules for the "no-prebuilt install from npm" case --- lifecycleScripts/submodules/getStatus.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lifecycleScripts/submodules/getStatus.js b/lifecycleScripts/submodules/getStatus.js index a6b3f801c..750e9a3a7 100644 --- a/lifecycleScripts/submodules/getStatus.js +++ b/lifecycleScripts/submodules/getStatus.js @@ -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 submoduels 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("+"); From 6272470d77a3f9776aaa22621c156538231755df Mon Sep 17 00:00:00 2001 From: John Haley Date: Mon, 9 May 2016 11:21:36 -0700 Subject: [PATCH 2/2] Fix typo in comment As much as I like the idea of dueling submodules... --- lifecycleScripts/submodules/getStatus.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lifecycleScripts/submodules/getStatus.js b/lifecycleScripts/submodules/getStatus.js index 750e9a3a7..53c85c1f3 100644 --- a/lifecycleScripts/submodules/getStatus.js +++ b/lifecycleScripts/submodules/getStatus.js @@ -6,7 +6,7 @@ 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 submoduels for + // 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([]);