Fix render of errors.

This commit is contained in:
André Cruz
2013-05-28 11:23:48 +01:00
parent e6f2d9de86
commit 130e417451

View File

@@ -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);
};