Commit 10af8659 10af8659596fdb70f197489ec23a2dc34427e238 by renatodarrigo

Update colorizer.js to check for ANSICON and have colors on Windows

1 parent 9b1a7263
......@@ -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);
......@@ -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 = [];
......