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/uninstall.js | |
parent | 11e8e4ec778d087271edacfc84baba5331e93a1a (diff) |
Crash on readJson errors other than ENOENT
Diffstat (limited to 'lib/uninstall.js')
-rw-r--r-- | lib/uninstall.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/uninstall.js b/lib/uninstall.js index b4dbd1de0..275088ef7 100644 --- a/lib/uninstall.js +++ b/lib/uninstall.js @@ -30,6 +30,7 @@ function uninstall (args, cb) { // remove this package from the global space, if it's installed there if (npm.config.get("global")) return cb(uninstall.usage) readJson(path.resolve(npm.prefix, "package.json"), function (er, pkg) { + if (er && er.code !== "ENOENT") return cb(er) if (er) return cb(uninstall.usage) uninstall_( [pkg.name] , npm.dir |