From 7c9219fc189e52fe76ce71f9d04886e29b31b439 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 9 Aug 2013 11:40:08 -0700 Subject: [PATCH] Add --color to force color output [GH-2027] --- CHANGELOG.md | 3 ++- bin/vagrant | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 127391fc3..0a16a74c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,12 +8,13 @@ FEATURES: IMPROVEMENTS: - - Ansible `inventory_path` can be a directory now. [GH-2035] + - core: add `--color` to any Vagrant command to FORCE color output. [GH-2027] - commands/plugin/install: Post install message of a plugin will be shown if available. [GH-1986] - commands/status: cosmetic improvement to better align names and statuses [GH-2016] - guests/suse: Supports private/public networks. [GH-1689] + - plugins/ansible: Ansible `inventory_path` can be a directory now. [GH-2035] BUG FIXES: diff --git a/bin/vagrant b/bin/vagrant index fc2234582..7f4a41e98 100755 --- a/bin/vagrant +++ b/bin/vagrant @@ -40,6 +40,12 @@ elsif !$stdout.tty? && !Vagrant::Util::Platform.cygwin? opts[:ui_class] = Vagrant::UI::Basic end +# Also allow users to force colors. +if ARGV.include?("--color") + ARGV.delete("--color") + opts[:ui_class] = Vagrant::UI::Colored +end + # Default to colored output opts[:ui_class] ||= Vagrant::UI::Colored