diff options
author | isaacs <i@izs.me> | 2012-12-28 05:25:53 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-12-28 05:25:53 +0400 |
commit | 00f781f6dcff43ee491b1b8b15294bec807b793d (patch) | |
tree | fb80187b81c6ffdc50c3173f1a000e260c9fa0ac /lib/dedupe.js | |
parent | 11e8e4ec778d087271edacfc84baba5331e93a1a (diff) |
Crash on readJson errors other than ENOENT
Diffstat (limited to 'lib/dedupe.js')
-rw-r--r-- | lib/dedupe.js | 1 |
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]++ |