From 9f1e7d98958585f623c3cc7fdb225dbc854ae06f Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Thu, 20 Dec 2018 07:43:43 -0800 Subject: [PATCH] Prevent nil dup as unsupported in 2.3 --- plugins/guests/alt/cap/configure_networks.rb | 2 +- plugins/guests/redhat/cap/configure_networks.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/guests/alt/cap/configure_networks.rb b/plugins/guests/alt/cap/configure_networks.rb index f4a778523..e9f64a940 100644 --- a/plugins/guests/alt/cap/configure_networks.rb +++ b/plugins/guests/alt/cap/configure_networks.rb @@ -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 diff --git a/plugins/guests/redhat/cap/configure_networks.rb b/plugins/guests/redhat/cap/configure_networks.rb index c5794aa38..c618c8e53 100644 --- a/plugins/guests/redhat/cap/configure_networks.rb +++ b/plugins/guests/redhat/cap/configure_networks.rb @@ -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