Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Re #2040 Don't print empty line if install did nothing

  • Loading branch information...
commit 8933ccdd0e803defc5a8fa028a29e326bfd41150 1 parent 511a780
@isaacs isaacs authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 lib/install.js
View
9 lib/install.js
@@ -75,12 +75,15 @@ function install (args, cb_) {
output = output || require("./utils/output.js")
var tree = treeify(installed)
- , pretty = prettify(tree, installed)
+ , pretty = prettify(tree, installed).trim()
- output.write(pretty, function (er) {
+ if (pretty) output.write(pretty, afterWrite)
+ else afterWrite()
+
+ function afterWrite (er) {
if (er) return cb_(er)
save(where, installed, tree, pretty, cb_)
- })
+ }
}
// the /path/to/node_modules/..
Please sign in to comment.
Something went wrong with that request. Please try again.