"provision.enabled" is once again honored. [GH-591]

This commit is contained in:
Mitchell Hashimoto 2011-12-17 20:27:24 -08:00
parent c2e3a3050a
commit 1770ad1ee5
2 changed files with 19 additions and 8 deletions

View File

@ -17,6 +17,7 @@
`sudo` installed Vagrant installations work. [GH-580]
- Provisioner stdout/stderr is now color coded based on stdout/stderr.
stdout is green, stderr is red. [GH-595]
- "--no-provision" once again works for certain commands. [GH-591]
## 0.8.10 (December 10, 2011)

View File

@ -9,17 +9,27 @@ module Vagrant
end
def call(env)
# Instantiate and prepare the provisioners. Preparation must happen here
# so that shared folders and such can properly take effect.
provisioners = enabled_provisioners
provisioners.map { |p| p.prepare }
provisioners = nil
# We set this here so that even if this value is changed in the future,
# it stays constant to what we expect here in this moment.
enabled = env["provision.enabled"]
if enabled
# Instantiate and prepare the provisioners. Preparation must happen here
# so that shared folders and such can properly take effect.
provisioners = enabled_provisioners
provisioners.map { |p| p.prepare }
end
@app.call(env)
# Take prepared provisioners and run the provisioning
provisioners.each do |instance|
@env[:ui].info I18n.t("vagrant.actions.vm.provision.beginning", :provisioner => instance.class)
instance.provision!
if enabled
# Take prepared provisioners and run the provisioning
provisioners.each do |instance|
@env[:ui].info I18n.t("vagrant.actions.vm.provision.beginning",
:provisioner => instance.class)
instance.provision!
end
end
end