Permalink
Browse files

Process symlinked shared library as .node

  • Loading branch information...
1 parent 840229a commit 7e0bf7d57de318f45a097e05644efa49beb65209 @paddybyers paddybyers committed with isaacs Nov 22, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/module.js
View
@@ -467,11 +467,11 @@ Module._extensions['.json'] = function(module, filename) {
};
-//Native extension for .node
+//Native extension for .node and OS-specific equivalents
Module._extensions['.node'] = function(module, filename) {
process.dlopen(filename, module.exports);
};
-
+Module._extensions['.dylib'] = Module._extensions['.node'];
@bnoordhuis
bnoordhuis Feb 1, 2012 Member

Shouldn't this check if process.platform === 'darwin'?

// bootstrap main module.
Module.runMain = function() {

3 comments on commit 7e0bf7d

@paddybyers

In truth, I don't really think we need this any more, since we figured out how to get gyp to generate xcode projects to build with a .node extension. I'm happy to generate a PR that adds the condition you've suggested, or backs out the change.

@bnoordhuis
Member

No worries, Paddy. I'll back out the change.

@paddybyers

OK, thanks. The other commit landed in the same PR is still good I think.

Please sign in to comment.