From 130e417451c388b417831d9aa510bdff89ab79fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Cruz?= Date: Tue, 28 May 2013 11:23:48 +0100 Subject: [PATCH] Fix render of errors. --- lib/renderers/StandardRenderer.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/renderers/StandardRenderer.js b/lib/renderers/StandardRenderer.js index 5858faa0..00585331 100644 --- a/lib/renderers/StandardRenderer.js +++ b/lib/renderers/StandardRenderer.js @@ -23,7 +23,8 @@ StandardRenderer.prototype.error = function (err) { err.id = err.code || 'error'; err.level = 'error'; - str = this._prefix(err) + ' ' + err.message + '\n'; + + str = this._prefixNotification(err) + ' ' + err.message + '\n'; // Check if additional details were provided if (err.details) { @@ -67,10 +68,13 @@ StandardRenderer.prototype._genericNotification = function (notification) { var stream; var str; - notification.message = notification.message || ''; - stream = notification.level === 'warn' ? process.stderr : process.stdout; - str = this._prefixNotification(notification) + ' ' + notification.message + '\n'; + if (notification.level === 'warn') { + stream = process.stderr; + } else { + stream = process.stdout; + } + str = this._prefixNotification(notification) + ' ' + notification.message + '\n'; this._write(stream, 'bower ' + str); };