Skip to content

Commit 150b7c1

Browse files
author
John Haley
committed
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.
1 parent 6ea5d45 commit 150b7c1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lifecycleScripts/submodules/getStatus.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,11 @@ module.exports = function getStatus() {
4040
.split("\n")
4141
.map(getStatusPromiseFromLine)
4242
);
43+
})
44+
.catch(function() {
45+
// In the case that NodeGit is required from another project via npm we
46+
// won't be able to run submodule commands but that's ok since the
47+
// correct version of libgit2 is published with nodegit.
48+
return Promise.resolve([]);
4349
});
4450
};

0 commit comments

Comments
 (0)