-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add nearby resolution #27
Conversation
4.2.0 |
if (prebuild) return prebuild | ||
|
||
var nearby = resolve(path.dirname(process.execPath)) | ||
if (nearby) return nearby |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if you have multiple addons using node-gyp-build
? Won't they conflict?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And what happens in a packed Electron app (e.g. with electron-builder
)? Which doesn't have a "real" execPath IIRC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t think this is relevant for electron but yes we should namespace the location here. This was a quick fix to work around a cli bundling issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mafintosh Is there a relevant GH issue I can read to learn more?
And re: electron, I'm a bit worried that this will accidentally load e.g. /tmp/foo.node
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issue sorry, we were debugging together. Can you explain the last part? About loading foo.node
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vaguely recall that process.execPath
is a temporary location in some cases, but I can't find documentation on that just now. Maybe I'll try to test it later this week.
This specifically allows loading of native modules with
zeit/pkg