[Command Line] Make sure all the colors are off when colorized output is disabled.

This commit is contained in:
Chris Eppstein 2010-01-20 17:33:13 -08:00
parent 04ed8c85fd
commit 1eef589c29

View File

@ -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
"" ""