lib/nanoc/cli.rb in nanoc-4.8.19 vs lib/nanoc/cli.rb in nanoc-4.9.0
- old
+ new
@@ -228,10 +228,10 @@
%w[LC_ALL LC_CTYPE LANG].any? { |e| ENV[e] =~ /UTF/i }
end
# @return [Boolean] true if color support is present, false if not
def self.enable_ansi_colors?(io)
- io.tty?
+ io.tty? && !ENV.key?('NO_COLOR')
end
def self.after_setup_procs
@after_setup_procs || []
end