From d64c164727fbddc5657b032df03cc2e833196e3b Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 18 Jan 2013 13:33:02 -0800 Subject: [PATCH] VM configuration only validates the active provider --- plugins/kernel_v2/config/vm.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/plugins/kernel_v2/config/vm.rb b/plugins/kernel_v2/config/vm.rb index eda7f4117..7021727b9 100644 --- a/plugins/kernel_v2/config/vm.rb +++ b/plugins/kernel_v2/config/vm.rb @@ -148,12 +148,10 @@ module VagrantPlugins # We're done with VM level errors so prepare the section errors = { "vm" => errors } - # Validate providers - @providers.each do |_name, vm_provider| - if vm_provider.config - provider_errors = vm_provider.config.validate(machine) - errors = Vagrant::Config::V2::Util.merge_errors(errors, provider_errors) - end + # Validate only the _active_ provider + if machine.provider_config + provider_errors = machine.provider_config.validate(machine) + errors = Vagrant::Config::V2::Util.merge_errors(errors, provider_errors) end # Validate provisioners