| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 67b6d7d commit 500d17b
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -616,7 +616,16 @@ Module._initPaths = function() { | |||
| 616 | 616 | homeDir = process.env.HOME; | |
| 617 | 617 | } | |
| 618 | 618 | ||
| 619 | - var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')]; | ||
| 619 | + // $PREFIX/lib/node, where $PREFIX is the root of the Node.js installation. | ||
| 620 | + var prefixDir; | ||
| 621 | + // process.execPath is $PREFIX/bin/node except on Windows where it is | ||
| 622 | + // $PREFIX\node.exe. | ||
| 623 | + if (isWindows) { | ||
| 624 | + prefixDir = path.resolve(process.execPath, '..'); | ||
| 625 | + } else { | ||
| 626 | + prefixDir = path.resolve(process.execPath, '..', '..'); | ||
| 627 | + } | ||
| 628 | + var paths = [path.resolve(prefixDir, 'lib', 'node')]; | ||
| 620 | 629 | ||
| 621 | 630 | if (homeDir) { | |
| 622 | 631 | paths.unshift(path.resolve(homeDir, '.node_libraries')); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments