FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Explicitly use `nodegit.node` when requiring native module · nodegit/nodegit@7baa338 · GitHub

Repository navigation

Commit 7baa338

Browse files
John Haley
committed
Explicitly use nodegit.node when requiring native module
Some things that override node's `require` (e.g. jest) might break when including nodegit since. This is a workaround until they fix that. I made an issue at jestjs/jest#353
1 parent 46d0369 commit 7baa338

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎generate/templates/templates/nodegit.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ var rawApi;
55
// Attempt to load the production release first, if it fails fall back to the
66
// debug release.
77
try {
8-
rawApi = require("../build/Release/nodegit");
8+
rawApi = require("../build/Release/nodegit.node");
99
}
1010
catch (ex) {
1111
/* istanbul ignore next */
1212
if (ex.code !== "MODULE_NOT_FOUND") {
1313
throw ex;
1414
}
1515

16-
rawApi = require("../build/Debug/nodegit");
16+
rawApi = require("../build/Debug/nodegit.node");
1717
}
1818

1919
// Native methods do not return an identifiable function, so we

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL