Disable colorization when the NO_COLOR env variable is defined.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user