2013-04-21 21:27:32 +00:00
|
|
|
# Monkey patch vagrant in order to reuse the UI test object that is set on
|
|
|
|
# our Vagrant::Environments
|
|
|
|
#
|
|
|
|
require 'vagrant/machine'
|
|
|
|
Vagrant::Machine.class_eval do
|
|
|
|
alias :old_action :action
|
|
|
|
|
2013-11-06 03:11:36 +00:00
|
|
|
define_method :action do |action_name, extra_env = nil|
|
2013-04-21 21:27:32 +00:00
|
|
|
extra_env = { ui: @env.ui }.merge(extra_env || {})
|
2013-11-06 03:11:36 +00:00
|
|
|
old_action action_name, extra_env
|
2013-04-21 21:27:32 +00:00
|
|
|
end
|
|
|
|
end
|