Delete "--no-color" from arguments if it is given

This commit is contained in:
Mitchell Hashimoto 2011-12-18 14:00:27 -08:00
parent 703f455d5a
commit 1dd41cfef4
1 changed files with 3 additions and 0 deletions

View File

@ -17,6 +17,9 @@ opts = {}
# Disable color if the proper argument was passed
if !$stdout.tty? || ARGV.include?("--no-color")
# Delete the argument from the list so that it doesn't cause any
# invalid arguments down the road.
ARGV.delete("--no-color")
opts[:ui_class] = Vagrant::UI::Basic
else
opts[:ui_class] = Vagrant::UI::Colored