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
|
end
|
||||||
|
|
||||||
# Get the provider configuration from the final loaded configuration
|
# Get the provider configuration from the final loaded configuration
|
||||||
vm_provider = config.vm.providers[provider]
|
provider_config = config.vm.providers[provider].config
|
||||||
provider_config = nil
|
|
||||||
provider_config = vm_provider.config if vm_provider
|
|
||||||
|
|
||||||
# Create the machine and cache it for future calls. This will also
|
# Create the machine and cache it for future calls. This will also
|
||||||
# return the machine from this method.
|
# return the machine from this method.
|
||||||
|
|
|
@ -28,8 +28,12 @@ module VagrantPlugins
|
||||||
@forwarded_ports = []
|
@forwarded_ports = []
|
||||||
@shared_folders = {}
|
@shared_folders = {}
|
||||||
@networks = []
|
@networks = []
|
||||||
@providers = {}
|
|
||||||
@provisioners = []
|
@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
|
end
|
||||||
|
|
||||||
# Custom merge method since some keys here are merged differently.
|
# Custom merge method since some keys here are merged differently.
|
||||||
|
|
Loading…
Reference in New Issue