Allow users to force color

Fixes GH-5390
This commit is contained in:
Seth Vargo 2016-05-30 15:54:24 -04:00
parent 4236ddc021
commit b95e5d80f5
No known key found for this signature in database
GPG Key ID: 905A90C2949E8787
2 changed files with 11 additions and 1 deletions

View File

@ -139,7 +139,7 @@ begin
end
# Also allow users to force colors.
if argv.include?("--color")
if argv.include?("--color") || ENV["VAGRANT_FORCE_COLOR"]
argv.delete("--color")
opts[:ui_class] = Vagrant::UI::Colored
end

View File

@ -97,6 +97,16 @@ The equivalent behavior can be achieved by using the `--no-color` flag
on a command-by-command basis. This environmental variable is useful
for setting this flag globally.
## `VAGRANT_FORCE_COLOR`
If this is set to any value, then Vagrant will force colored output, even
if it detected that there is no TTY or the current environment does not
support it.
The equivalent behavior can be achieved by using the `--color` flag on a
command-by-command basis. This environmental variable is useful for setting
this flag globally.
## `VAGRANT_NO_PLUGINS`
If this is set to any value, then Vagrant will not load any 3rd party