Make configured VM providers default to an empty one
This commit is contained in:
parent
553d4a828a
commit
e88d735cb6
|
@ -213,9 +213,7 @@ module Vagrant
|
|||
end
|
||||
|
||||
# Get the provider configuration from the final loaded configuration
|
||||
vm_provider = config.vm.providers[provider]
|
||||
provider_config = nil
|
||||
provider_config = vm_provider.config if vm_provider
|
||||
provider_config = config.vm.providers[provider].config
|
||||
|
||||
# Create the machine and cache it for future calls. This will also
|
||||
# return the machine from this method.
|
||||
|
|
|
@ -28,8 +28,12 @@ module VagrantPlugins
|
|||
@forwarded_ports = []
|
||||
@shared_folders = {}
|
||||
@networks = []
|
||||
@providers = {}
|
||||
@provisioners = []
|
||||
|
||||
# The providers hash defaults any key to a provider object
|
||||
@providers = Hash.new do |hash, key|
|
||||
hash[key] = VagrantConfigProvider.new(key, nil)
|
||||
end
|
||||
end
|
||||
|
||||
# Custom merge method since some keys here are merged differently.
|
||||
|
|
Loading…
Reference in New Issue