Prevent nil dup as unsupported in 2.3

This commit is contained in:
Chris Roberts 2018-12-20 07:43:43 -08:00
parent a4a98d97fc
commit 9f1e7d9895
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ module VagrantPlugins
end.compact
networks.each.with_index do |network, i|
network[:device] = interfaces[network[:interface]]
extra_opts = net_configs[i].dup || {}
extra_opts = net_configs[i] ? net_configs[i].dup : {}
if nmcli_installed
# Now check if the device is actively being managed by NetworkManager

View File

@ -24,7 +24,7 @@ module VagrantPlugins
end.compact
networks.each.with_index do |network, i|
network[:device] = interfaces[network[:interface]]
extra_opts = net_configs[i].dup || {}
extra_opts = net_configs[i] ? net_configs[i].dup : {}
if nmcli_installed
# Now check if the device is actively being managed by NetworkManager