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
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-12-28 05:25:53 +0400
committerisaacs <i@izs.me>2012-12-28 05:25:53 +0400
commit00f781f6dcff43ee491b1b8b15294bec807b793d (patch)
treefb80187b81c6ffdc50c3173f1a000e260c9fa0ac /lib/dedupe.js
parent11e8e4ec778d087271edacfc84baba5331e93a1a (diff)
Crash on readJson errors other than ENOENT
Diffstat (limited to 'lib/dedupe.js')
-rw-r--r--lib/dedupe.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/dedupe.js b/lib/dedupe.js
index 67481c6db..51c6fca90 100644
--- a/lib/dedupe.js
+++ b/lib/dedupe.js
@@ -265,6 +265,7 @@ function readInstalled (dir, counter, parent, cb) {
})
readJson(path.resolve(dir, "package.json"), function (er, data) {
+ if (er && er.code !== "ENOENT") return cb(er)
if (er) return cb() // not a package, probably.
counter[data.name] = counter[data.name] || 0
counter[data.name]++