Created
April 15, 2015 18:42
-
-
Save deepak1556/b6986a78ef25fd3c4098 to your computer and use it in GitHub Desktop.
Remove system location for module lookups
This file contains hidden or 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
commit 826f15a681380b1d074db2cdeed4c5d143c3a3da | |
Author: Robo <[email protected]> | |
Date: Thu Apr 16 00:08:56 2015 +0530 | |
remove system location for module lookups | |
diff --git a/lib/module.js b/lib/module.js | |
index 79359da..c04778b 100644 | |
--- a/lib/module.js | |
+++ b/lib/module.js | |
@@ -462,26 +462,8 @@ Module.runMain = function() { | |
}; | |
Module._initPaths = function() { | |
- const isWindows = process.platform === 'win32'; | |
- | |
- if (isWindows) { | |
- var homeDir = process.env.USERPROFILE; | |
- } else { | |
- var homeDir = process.env.HOME; | |
- } | |
- | |
var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')]; | |
- if (homeDir) { | |
- paths.unshift(path.resolve(homeDir, '.node_libraries')); | |
- paths.unshift(path.resolve(homeDir, '.node_modules')); | |
- } | |
- | |
- var nodePath = process.env['NODE_PATH']; | |
- if (nodePath) { | |
- paths = nodePath.split(path.delimiter).concat(paths); | |
- } | |
- | |
modulePaths = paths; | |
// clone as a read-only copy, for introspection. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment