From 88673e4d2e3843ee533e919b46f053746ef8abec Mon Sep 17 00:00:00 2001 From: Teemu Matilainen Date: Sun, 27 Oct 2013 16:01:22 -0300 Subject: [PATCH] Store the final `provision_enabled` value to env Let other middleware actions to know if we are really going to run the provisioners. --- lib/vagrant/action/builtin/provision.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/vagrant/action/builtin/provision.rb b/lib/vagrant/action/builtin/provision.rb index 99ed32f54..7f680d344 100644 --- a/lib/vagrant/action/builtin/provision.rb +++ b/lib/vagrant/action/builtin/provision.rb @@ -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|