VM configuration only validates the active provider

This commit is contained in:
Mitchell Hashimoto 2013-01-18 13:33:02 -08:00
parent 003ebc811c
commit d64c164727
1 changed files with 4 additions and 6 deletions

View File

@ -148,12 +148,10 @@ module VagrantPlugins
# We're done with VM level errors so prepare the section # We're done with VM level errors so prepare the section
errors = { "vm" => errors } errors = { "vm" => errors }
# Validate providers # Validate only the _active_ provider
@providers.each do |_name, vm_provider| if machine.provider_config
if vm_provider.config provider_errors = machine.provider_config.validate(machine)
provider_errors = vm_provider.config.validate(machine) errors = Vagrant::Config::V2::Util.merge_errors(errors, provider_errors)
errors = Vagrant::Config::V2::Util.merge_errors(errors, provider_errors)
end
end end
# Validate provisioners # Validate provisioners