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>2014-07-02 21:08:37 +0400
committerisaacs <i@izs.me>2014-07-02 21:33:31 +0400
commitb3d112ae190b984cc1779b9e6de92218f22380c6 (patch)
treedb53ecbcda53ad35aa26d9d642944b27dbd1335d
parent0353ddeaca8171aa7dbdd8102b7e2eb581a86406 (diff)
outdated: Don't show headings if there's nothing to output
-rw-r--r--lib/outdated.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/outdated.js b/lib/outdated.js
index b29ea9fe6..11c02034a 100644
--- a/lib/outdated.js
+++ b/lib/outdated.js
@@ -39,7 +39,7 @@ function outdated (args, silent, cb) {
if (typeof cb !== "function") cb = silent, silent = false
var dir = path.resolve(npm.dir, "..")
outdated_(args, dir, {}, 0, function (er, list) {
- if (er || silent) return cb(er, list)
+ if (er || silent || list.length === 0) return cb(er, list)
if (npm.config.get("json")) {
console.log(makeJSON(list))
} else if (npm.config.get("parseable")) {