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
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