-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recognize electron as a valid runtime
- Loading branch information
Showing
2 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
da292e7
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 guess electron must be covered in
node-pre-gyp/lib/util/versioning.js
Line 252 in da292e7
da292e7
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.
Unless node-pre-gyp is executed with Electron instead of Node, detecting Electron there doesn't make much sense, the same goes for node-webkit too.
da292e7
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.
To get
node-inspector
to load source files from the app ASAR it needs to be executed from Electron (or at least that's the only workaround I've found), which is where I hit a bit of a snag at the line @kenr mentioned. I rebuilt the native modules ofnode-inspector
for Electron but the runtime defaults to Node at the aforementioned line so path resolution using node-pre-gyp.find() fails for the native modules. I've submitted PR #187 to fix this.