Disable colorization when the NO_COLOR env variable is defined.

This commit is contained in:
Jim Weirich
2010-08-26 07:55:04 -04:00
parent f88e9f1dfc
commit d17cc7b457

View File

@@ -53,7 +53,11 @@ module EdgeCase
end
def self.colorize(string, color_value)
color(color_value) + string + color(COLORS[:clear])
if ENV['NO_COLOR']
string
else
color(color_value) + string + color(COLORS[:clear])
end
end
def self.color(color_value)