From a857056136a446397127ac58f3069377897bb16a Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Fri, 30 Mar 2018 12:48:16 -0700 Subject: [PATCH] Update color for run_remote to match shell provisioner colors --- lib/vagrant/plugin/v2/trigger.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/vagrant/plugin/v2/trigger.rb b/lib/vagrant/plugin/v2/trigger.rb index 162b086d3..c8e2cdf5a 100644 --- a/lib/vagrant/plugin/v2/trigger.rb +++ b/lib/vagrant/plugin/v2/trigger.rb @@ -169,12 +169,15 @@ module Vagrant begin # TODO: should we check config or command for sudo? And if so, WARN the user? result = Vagrant::Util::Subprocess.execute(*cmd, :notify => [:stdout, :stderr]) do |type,data| + options = {} case type when :stdout - @machine.ui.detail(data) + options[:color] = :green if !config.keep_color when :stderr - @machine.ui.error(data) + options[:color] = :red if !config.keep_color end + + @machine.ui.detail(data, options) end rescue Exception => e # TODO: I18n me and write better message