Comparing version 0.5.8 to 0.5.9
@@ -237,2 +237,3 @@ var assert = require("assert"); | ||
out: function(text, color) { | ||
text = (text + "").trim(); | ||
if (colors.hasOwnProperty(color)) | ||
@@ -244,2 +245,3 @@ text = colors[color] + text + colors.reset; | ||
err: function(text, color) { | ||
text = (text + "").trim(); | ||
if (!colors.hasOwnProperty(color)) | ||
@@ -246,0 +248,0 @@ color = "red"; |
@@ -156,10 +156,11 @@ var assert = require("assert"); | ||
switch (code) { | ||
case 0: case 1: // 1 means no results | ||
if (errs.length === 0) { | ||
deferred.resolve(outs.join("")); | ||
break; | ||
default: | ||
if (errs.length > 0) { | ||
util.log.err(errs.join("")); | ||
} | ||
// intentionally fall through | ||
default: | ||
deferred.reject(errs.join("")); | ||
case 0: case 1: // 1 means no results | ||
deferred.resolve(outs.join("")); | ||
} | ||
@@ -166,0 +167,0 @@ }); |
@@ -17,3 +17,3 @@ { | ||
], | ||
"version": "0.5.8", | ||
"version": "0.5.9", | ||
"homepage": "http://github.com/benjamn/commoner", | ||
@@ -20,0 +20,0 @@ "repository": { |
48313
1061