From 887f94260eecb9c5d7ef981e43d23f1790c186dd Mon Sep 17 00:00:00 2001 From: Hugues Lismonde Date: Wed, 11 Feb 2015 11:07:03 +0100 Subject: [PATCH] Support Regexp usage for bridge configuration --- plugins/providers/virtualbox/action/network.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/providers/virtualbox/action/network.rb b/plugins/providers/virtualbox/action/network.rb index 22eb08cb1..f1beff00b 100644 --- a/plugins/providers/virtualbox/action/network.rb +++ b/plugins/providers/virtualbox/action/network.rb @@ -157,8 +157,10 @@ module VagrantPlugins @logger.debug("Bridge was directly specified in config, searching for: #{config[:bridge]}") # Search for a matching bridged interface + bridge = config[:bridge] + bridge = bridge.downcase if bridge.respond_to?(:downcase) bridgedifs.each do |interface| - if interface[:name].downcase == config[:bridge].downcase + if bridge === interface[:name].downcase @logger.debug("Specific bridge found as configured in the Vagrantfile. Using it.") chosen_bridge = interface[:name] break