Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detect the correct runtime when find() is called from Electron
This fixes the case where require('node-pre-gyp').find() is called from Electron without explicitly specifying the runtime in the options. Previously the runtime would just default to "node" and find() would fail to find any native modules specifically built for Electron because `node-gyp` named the build output directory `{runtime}-v{version}-{platform}-{arch}`. For example after building a native module for Electron v0.34.2 the module binary ended up in the `electron-v0.34-win32-x64` directory, but find() was looking for it in the `node-v46-win32-x64` directory.
- Loading branch information