summaryrefslogtreecommitdiff
path: root/deps/npm/lib/install.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/install.js')
-rw-r--r--deps/npm/lib/install.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/deps/npm/lib/install.js b/deps/npm/lib/install.js
index 1fb6dc30c0..211a6612ed 100644
--- a/deps/npm/lib/install.js
+++ b/deps/npm/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/..