Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2010-05-10 11:47:37 +0400
committerisaacs <i@izs.me>2010-05-10 11:50:10 +0400
commitc94ccd55e5f1bfc092f808b7b71e0a9c4f89ddc2 (patch)
tree8fc7ab2ae05e5ae0396c2c76f8c97c9fc71d712f /lib
parent24c9f439796fe0c2e5545bc1514ce161602e012f (diff)
Use paths[1] instead of paths[0], since npm adds one item to the path when it's running.
Diffstat (limited to 'lib')
-rw-r--r--lib/utils/ini.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils/ini.js b/lib/utils/ini.js
index 9dfec2ebc..e740ced86 100644
--- a/lib/utils/ini.js
+++ b/lib/utils/ini.js
@@ -42,7 +42,7 @@ var sys = require("sys")
, defaultConfig =
{ 'auto-activate' : true
, root : iamroot ? path.join(process.installPrefix, "lib", "node")
- : require.paths.length ? require.paths[0]
+ : require.paths.length > 1 ? require.paths[1]
: process.env.HOME ? path.join(process.env.HOME, '.node_libraries')
: process.cwd()
, binroot : path.join(process.installPrefix, "bin")