Update color for run_remote to match shell provisioner colors
This commit is contained in:
parent
8b71c24f90
commit
a857056136
|
@ -169,12 +169,15 @@ module Vagrant
|
||||||
begin
|
begin
|
||||||
# TODO: should we check config or command for sudo? And if so, WARN the user?
|
# 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|
|
result = Vagrant::Util::Subprocess.execute(*cmd, :notify => [:stdout, :stderr]) do |type,data|
|
||||||
|
options = {}
|
||||||
case type
|
case type
|
||||||
when :stdout
|
when :stdout
|
||||||
@machine.ui.detail(data)
|
options[:color] = :green if !config.keep_color
|
||||||
when :stderr
|
when :stderr
|
||||||
@machine.ui.error(data)
|
options[:color] = :red if !config.keep_color
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@machine.ui.detail(data, options)
|
||||||
end
|
end
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
# TODO: I18n me and write better message
|
# TODO: I18n me and write better message
|
||||||
|
|
Loading…
Reference in New Issue