Merge pull request #7364 from mitchellh/sethvargo/force_color

Allow users to force color
This commit is contained in:
Seth Vargo 2016-05-30 15:59:52 -04:00
commit 44ce6a4bc7
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