Put the machine action in the middleware env

This commit is contained in:
Mitchell Hashimoto 2013-02-06 16:23:35 -08:00
parent 1df4891371
commit acbd024fa2
2 changed files with 5 additions and 4 deletions

View File

@ -50,7 +50,7 @@ module Vagrant
next if env[:provision_types] && \
!env[:provision_types].include?(type_map[p])
run_provisioner(p)
run_provisioner(env, p)
end
end
end
@ -58,7 +58,7 @@ module Vagrant
# This is pulled out into a seperate method so that users can
# subclass and implement custom behavior if they'd like around
# this step.
def run_provisioner(p)
def run_provisioner(env, p)
env[:ui].info(I18n.t("vagrant.actions.vm.provision.beginning",
:provisioner => p.class))

View File

@ -121,8 +121,9 @@ module Vagrant
# Run the action with the action runner on the environment
env = {
:machine => self,
:ui => @env.ui_class.new(@name)
:machine => self,
:machine_action => name,
:ui => @env.ui_class.new(@name)
}.merge(extra_env || {})
@env.action_runner.run(callable, env)
end