mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-06-08 16:26:25 -04:00
adjust the fix for #13371 to conform to code elsewhere in the file and check for IPAM
This commit is contained in:
parent
5a191b388b
commit
ad92256190
1 changed files with 4 additions and 4 deletions
|
|
@ -348,10 +348,10 @@ module VagrantPlugins
|
|||
|
||||
network_info = inspect_network(all_networks)
|
||||
network_info.each do |network|
|
||||
config = Array(network["IPAM"]["Config"])
|
||||
if ( config &&
|
||||
config.size > 0 &&
|
||||
config.first["Subnet"] == subnet_string)
|
||||
next if !network["IPAM"]
|
||||
config = network["IPAM"]["Config"]
|
||||
next if !config || config.size < 1
|
||||
if (config.first["Subnet"] == subnet_string)
|
||||
@logger.debug("Found existing network #{network["Name"]} already configured with #{subnet_string}")
|
||||
return network["Name"]
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue