Merge pull request #13337 from larstobi/fix-undefined-method-size-for-nilclass-network-config-size
Fix undefined method `size' for nil:NilClass in network_defined?
This commit is contained in:
commit
f2092af607
@ -349,7 +349,8 @@ module VagrantPlugins
|
||||
network_info = inspect_network(all_networks)
|
||||
network_info.each do |network|
|
||||
config = network["IPAM"]["Config"]
|
||||
if (config.size > 0 &&
|
||||
if (defined?(config.size) &&
|
||||
config.size > 0 &&
|
||||
config.first["Subnet"] == subnet_string)
|
||||
@logger.debug("Found existing network #{network["Name"]} already configured with #{subnet_string}")
|
||||
return network["Name"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user