From 150b7c1f158e8274e5b1fd56b6123e97b2c42e91 Mon Sep 17 00:00:00 2001 From: John Haley Date: Wed, 8 Jun 2016 15:32:12 -0700 Subject: [PATCH] Fix submodule check When installing NodeGit from npm as a dependency if the user had to build the binary it would fail on the submodule check. Now we just bypass that check on and error since the package would be published with the correct version of libgit2 in it and we don't need to grab it as a submodule at that point anyways so the check and logic is useless. --- lifecycleScripts/submodules/getStatus.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lifecycleScripts/submodules/getStatus.js b/lifecycleScripts/submodules/getStatus.js index 53c85c1f3..2fcc42d37 100644 --- a/lifecycleScripts/submodules/getStatus.js +++ b/lifecycleScripts/submodules/getStatus.js @@ -40,5 +40,11 @@ module.exports = function getStatus() { .split("\n") .map(getStatusPromiseFromLine) ); + }) + .catch(function() { + // In the case that NodeGit is required from another project via npm we + // won't be able to run submodule commands but that's ok since the + // correct version of libgit2 is published with nodegit. + return Promise.resolve([]); }); };