Store the final `provision_enabled` value to env

Let other middleware actions to know if we are really going to run the
provisioners.
This commit is contained in:
Teemu Matilainen 2013-10-27 16:01:22 -03:00
parent eb6256316c
commit 88673e4d2e
1 changed files with 7 additions and 2 deletions

View File

@ -42,8 +42,13 @@ module Vagrant
end
end
# If we explicitly specified, take that value.
enabled = env[:provision_enabled] if env.has_key?(:provision_enabled)
if env.has_key?(:provision_enabled)
# If we explicitly specified, take that value.
enabled = env[:provision_enabled]
else
# Otherwise store the value so that other actions can use it.
env[:provision_enabled] = enabled
end
# Ask the provisioners to modify the configuration if needed
provisioner_instances.each do |p|