[Command Line] [Windows] Disable colorized output if win32console cannot be loaded.
Closes GH-82
This commit is contained in:
parent
6b5ffdb0d6
commit
3dd2a90dec
@ -6,7 +6,11 @@ require 'compass/actions'
|
|||||||
require 'compass/installers'
|
require 'compass/installers'
|
||||||
require 'compass/commands'
|
require 'compass/commands'
|
||||||
require 'rbconfig'
|
require 'rbconfig'
|
||||||
require 'win32console' if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/
|
begin
|
||||||
|
require 'win32console' if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/
|
||||||
|
rescue LoadError
|
||||||
|
$boring = true
|
||||||
|
end
|
||||||
|
|
||||||
module Compass::Exec
|
module Compass::Exec
|
||||||
end
|
end
|
||||||
|
@ -46,7 +46,11 @@ module Compass
|
|||||||
|
|
||||||
def color(c)
|
def color(c)
|
||||||
if Compass.configuration.color_output && c && COLORS.has_key?(c.to_sym)
|
if Compass.configuration.color_output && c && COLORS.has_key?(c.to_sym)
|
||||||
|
if defined?($boring) && $boring
|
||||||
|
""
|
||||||
|
else
|
||||||
"\e[#{COLORS[c.to_sym]}m"
|
"\e[#{COLORS[c.to_sym]}m"
|
||||||
|
end
|
||||||
else
|
else
|
||||||
""
|
""
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user