diff options
author | isaacs <i@izs.me> | 2013-01-24 09:06:31 -0800 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-01-24 09:10:01 -0800 |
commit | e722ca32d9822e50954144c123794ee4380f03cb (patch) | |
tree | f2b41030c20f8c0277411a891577bd521d058805 /deps/npm/lib/run-script.js | |
parent | 7a2ebce8d8e939370ce24ff464e157d29dded806 (diff) | |
download | android-node-v8-e722ca32d9822e50954144c123794ee4380f03cb.tar.gz android-node-v8-e722ca32d9822e50954144c123794ee4380f03cb.tar.bz2 android-node-v8-e722ca32d9822e50954144c123794ee4380f03cb.zip |
npm: Upgrade to v1.2.3
Diffstat (limited to 'deps/npm/lib/run-script.js')
-rw-r--r-- | deps/npm/lib/run-script.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/deps/npm/lib/run-script.js b/deps/npm/lib/run-script.js index d509cc86e0..0808f2edd6 100644 --- a/deps/npm/lib/run-script.js +++ b/deps/npm/lib/run-script.js @@ -25,7 +25,7 @@ runScript.completion = function (opts, cb) { // or a package, in which case, complete against its scripts var json = path.join(npm.prefix, "package.json") return readJson(json, function (er, d) { - if (er && er.code !== "ENOENT") return cb(er) + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) if (er) d = {} var scripts = Object.keys(d.scripts || {}) console.error("local scripts", scripts) @@ -36,7 +36,7 @@ runScript.completion = function (opts, cb) { var pkgDir = path.resolve( pref, "node_modules" , argv[2], "package.json" ) readJson(pkgDir, function (er, d) { - if (er && er.code !== "ENOENT") return cb(er) + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) if (er) d = {} var scripts = Object.keys(d.scripts || {}) return cb(null, scripts) @@ -57,7 +57,7 @@ runScript.completion = function (opts, cb) { if (npm.config.get("global")) scripts = [], next() else readJson(path.join(npm.prefix, "package.json"), function (er, d) { - if (er && er.code !== "ENOENT") return cb(er) + if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er) d = d || {} scripts = Object.keys(d.scripts || {}) next() |