diff options
author | isaacs <i@izs.me> | 2014-02-16 20:43:16 -0800 |
---|---|---|
committer | isaacs <i@izs.me> | 2014-02-16 20:43:16 -0800 |
commit | ec2fc4ca4d3eacaa3dc1db1673169b89233b9823 (patch) | |
tree | 0aa8a647e5111653bdf9c122182be93bf8823c7b /deps/npm/lib/utils/completion/installed-deep.js | |
parent | 86b8d84811484763b251b9a8a2b9e673964ea6b5 (diff) | |
download | node-npm-v1.4.3.tar.gz |
npm: upgrade to 1.4.3npm-v1.4.3
Diffstat (limited to 'deps/npm/lib/utils/completion/installed-deep.js')
-rw-r--r-- | deps/npm/lib/utils/completion/installed-deep.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/deps/npm/lib/utils/completion/installed-deep.js b/deps/npm/lib/utils/completion/installed-deep.js index b49d7bb77..99e320788 100644 --- a/deps/npm/lib/utils/completion/installed-deep.js +++ b/deps/npm/lib/utils/completion/installed-deep.js @@ -6,12 +6,16 @@ var npm = require("../../npm.js") function installedDeep (opts, cb) { var local , global + , depth = npm.config.get("depth") + , opt = { depth: depth } + if (npm.config.get("global")) local = [], next() - else readInstalled(npm.prefix, npm.config.get("depth"), function (er, data) { + else readInstalled(npm.prefix, opt, function (er, data) { local = getNames(data || {}) next() }) - readInstalled(npm.config.get("prefix"), npm.config.get("depth"), function (er, data) { + + readInstalled(npm.config.get("prefix"), opt, function (er, data) { global = getNames(data || {}) next() }) |