diff options
author | isaacs <i@izs.me> | 2011-03-22 04:03:40 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2011-03-22 04:03:40 +0300 |
commit | 6d7c5d7b47b93b8ae5583f031a628e5e578442ff (patch) | |
tree | 90700a5eb46aa67d5579154634766bbf7ae4d4ac /npm.js | |
parent | f8546b4627728a34b163ccb4cd82d216519da8e5 (diff) |
Don't put node_modules directly in prefix. put it in prefix/lib
Diffstat (limited to 'npm.js')
-rw-r--r-- | npm.js | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -213,7 +213,13 @@ npm.config = } Object.defineProperty(npm, "dir", - { get : function () { return path.resolve(npm.prefix, "node_modules") } + { get : function () { + if (npm.config.get("global")) { + return path.resolve(npm.prefix, "lib", "node_modules") + } else { + return path.resolve(npm.prefix, "node_modules") + } + } , enumerable : true }) |