lib/nanoc/cli.rb in nanoc-4.2.3 vs lib/nanoc/cli.rb in nanoc-4.2.4

- old
+ new

@@ -4,17 +4,10 @@ $stderr.puts e $stderr.puts "If you are using a Gemfile, make sure that the Gemfile contains Nanoc ('gem \"nanoc\"')." exit 1 end -if Nanoc.on_windows? - begin - require 'Win32/Console/ANSI' - rescue LoadError - end -end - # @api private module Nanoc::CLI module Commands end @@ -206,18 +199,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) - unless io.tty? - return false - end - - if Nanoc.on_windows? - return defined?(::Win32::Console::ANSI) - end - - true + io.tty? end def self.after_setup_procs @after_setup_procs || [] end