core: improved commenting in bin/vagrant
This commit is contained in:
parent
3002f8d522
commit
eb6256316c
|
@ -37,7 +37,9 @@ if ARGV.include?("--no-color")
|
|||
elsif !Vagrant::Util::Platform.terminal_supports_colors?
|
||||
opts[:ui_class] = Vagrant::UI::Basic
|
||||
elsif !$stdout.tty? && !Vagrant::Util::Platform.cygwin?
|
||||
opts[:ui_class] = Vagrant::UI::Basic
|
||||
# Cygwin always reports STDOUT is not a TTY, so we only disable
|
||||
# colors if its not a TTY AND its not Cygwin.
|
||||
opts[:ui_class] = Vagrant::UI::Basic
|
||||
end
|
||||
|
||||
# Also allow users to force colors.
|
||||
|
|
|
@ -85,10 +85,7 @@ module Vagrant
|
|||
# Returns a boolean noting whether the terminal supports color.
|
||||
# output.
|
||||
def terminal_supports_colors?
|
||||
if windows?
|
||||
return ENV.has_key?("ANSICON") || cygwin?
|
||||
end
|
||||
|
||||
return ENV.has_key?("ANSICON") || cygwin? if windows?
|
||||
true
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue