Skip to content

Commit

Permalink
Try requiring build/Debug/nodegit if build/Release/nodegit wasn't found.
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Oct 13, 2013
1 parent b6600b7 commit 04fefbc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Expand Up @@ -10,7 +10,12 @@ if (~os.type().indexOf('CYGWIN') && !~path.indexOf(root)) {
}

// Assign raw api to module
var rawApi = require('./build/Release/nodegit');
var rawApi;
try {
rawApi = require('./build/Release/nodegit');
} catch (e) {
rawApi = require('./build/Debug/nodegit');
}
for (var key in rawApi) {
exports[key] = rawApi[key];
}
Expand Down

0 comments on commit 04fefbc

Please sign in to comment.