For hooks, put the environment in the action env

This commit is contained in:
Mitchell Hashimoto 2013-02-22 15:52:57 -08:00
parent 3b2a82003e
commit 60a1b035e7
1 changed files with 4 additions and 1 deletions

View File

@ -246,7 +246,10 @@ module Vagrant
def hook(name)
@logger.info("Running hook: #{name}")
callable = Action::Builder.new
action_runner.run(callable, :action_name => name)
action_runner.run(
callable,
:action_name => name,
:env => self)
end
# This returns a machine with the proper provider for this environment.