diff options
author | isaacs <i@izs.me> | 2012-08-21 20:15:10 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-08-21 20:15:10 +0400 |
commit | 30ed292fa7bd2a7961fbf0d1c774ec1f2718210a (patch) | |
tree | 6bb3ed1f09707e3bc4551f02c414e92dbf24cf16 | |
parent | 29d45f96f10b0eec065d6ef121189beae8c3050f (diff) |
Fix #2738 respect --color=false in view
-rw-r--r-- | lib/view.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/view.js b/lib/view.js index bdfd48165..4e2443de2 100644 --- a/lib/view.js +++ b/lib/view.js @@ -182,6 +182,7 @@ function printData (data, name, cb) { , msg = "" , showVersions = versions.length > 1 , showFields + , color = npm.config.get("color") versions.forEach(function (v, i) { var fields = Object.keys(data[v]) @@ -189,7 +190,7 @@ function printData (data, name, cb) { fields.forEach(function (f) { var d = cleanup(data[v][f]) if (showVersions || showFields || typeof d !== "string") { - d = util.inspect(cleanup(data[v][f]), false, 5, true) + d = util.inspect(cleanup(data[v][f]), false, 5, color) } if (f && showFields) f += " = " if (d.indexOf("\n") !== -1) d = "\n" + d |