From 8ba4865e0aa50e56d3d79ad8e6dd40ca0fe97097 Mon Sep 17 00:00:00 2001 From: Anton Dessiatov Date: Wed, 18 Apr 2018 15:06:16 +0700 Subject: [PATCH] Request 'configure_networks' capability only if there actually are networks to configure --- .../action/create_network_interfaces.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/vagrant-libvirt/action/create_network_interfaces.rb b/lib/vagrant-libvirt/action/create_network_interfaces.rb index 74d9448..bc0feb4 100644 --- a/lib/vagrant-libvirt/action/create_network_interfaces.rb +++ b/lib/vagrant-libvirt/action/create_network_interfaces.rb @@ -219,10 +219,12 @@ module VagrantPlugins networks_to_configure << network end - env[:ui].info I18n.t('vagrant.actions.vm.network.configuring') - env[:machine].guest.capability( - :configure_networks, networks_to_configure - ) + unless networks_to_configure.empty? + env[:ui].info I18n.t('vagrant.actions.vm.network.configuring') + env[:machine].guest.capability( + :configure_networks, networks_to_configure + ) + end end end