Skip to content

Commit

Permalink
Update colorizer.js to check for ANSICON and have colors on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
renatodarrigo committed May 27, 2013
1 parent 9b1a726 commit 10af865
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/colorizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ var Colorizer = function Colorizer() {
* @return String
*/
this.colorize = function colorize(text, styleName, pad) {
if (fs.isWindows() || !env['ANSICON'] || !(styleName in styles)) {
if ((fs.isWindows() && !env['ANSICON']) || !(styleName in styles)) {
return text;
}
return this.format(text, styles[styleName], pad);
Expand All @@ -94,7 +94,7 @@ var Colorizer = function Colorizer() {
* @return String
*/
this.format = function format(text, style, pad) {
if (fs.isWindows() || !env['ANSICON'] || !utils.isObject(style)) {
if ((fs.isWindows() && !env['ANSICON']) || !utils.isObject(style)) {
return text;
}
var codes = [];
Expand Down

0 comments on commit 10af865

Please sign in to comment.