[Command Line] Make sure all the colors are off when colorized output is disabled.
This commit is contained in:
parent
04ed8c85fd
commit
1eef589c29
@ -36,7 +36,6 @@ module Compass
|
|||||||
end
|
end
|
||||||
|
|
||||||
def red
|
def red
|
||||||
return yield unless Compass.configuration.color_output
|
|
||||||
$stderr.write(color(:red))
|
$stderr.write(color(:red))
|
||||||
$stdout.write(color(:red))
|
$stdout.write(color(:red))
|
||||||
yield
|
yield
|
||||||
@ -46,7 +45,7 @@ module Compass
|
|||||||
end
|
end
|
||||||
|
|
||||||
def color(c)
|
def color(c)
|
||||||
if c && COLORS.has_key?(c.to_sym)
|
if Compass.configuration.color_output && c && COLORS.has_key?(c.to_sym)
|
||||||
"\e[#{COLORS[c.to_sym]}m"
|
"\e[#{COLORS[c.to_sym]}m"
|
||||||
else
|
else
|
||||||
""
|
""
|
||||||
|
Loading…
Reference in New Issue
Block a user