diff options
Diffstat (limited to 'deps/npm/lib/view.js')
-rw-r--r-- | deps/npm/lib/view.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/deps/npm/lib/view.js b/deps/npm/lib/view.js index 47da39b642..9199d352ae 100644 --- a/deps/npm/lib/view.js +++ b/deps/npm/lib/view.js @@ -254,7 +254,13 @@ function printData (data, name, cb) { }) }) - console.log(msg) + // preserve output symmetry by adding a whitespace-only line at the end if + // there's one at the beginning + if (/^\s*\n/.test(msg)) msg += "\n" + + // print directly to stdout to not unnecessarily add blank lines + process.stdout.write(msg) + cb(null, data) } function cleanup (data) { |