Skip to content

Commit

Permalink
Merge pull request #918 from nanoc/remove-win32console
Browse files Browse the repository at this point in the history
Remove win32console require
  • Loading branch information
denisdefreyne committed Jul 24, 2016
2 parents 684f81b + 32cdeec commit 73b3993
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions lib/nanoc/cli.rb
Expand Up @@ -6,13 +6,6 @@
exit 1
end

if Nanoc.on_windows?
begin
require 'Win32/Console/ANSI'
rescue LoadError
end
end

# @api private
module Nanoc::CLI
module Commands
Expand Down Expand Up @@ -208,15 +201,7 @@ def self.enable_utf8?(io)

# @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
Expand Down

0 comments on commit 73b3993

Please sign in to comment.