From 7a9363e8a108dfc37217e0aa74f67721a5c23a86 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 4 Jan 2013 16:35:13 -1000 Subject: [PATCH] Fix ordering of forwarded_port call --- config/default.rb | 2 +- plugins/providers/virtualbox/driver/version_4_2.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/default.rb b/config/default.rb index 4aea2ecea..2b27cfb51 100644 --- a/config/default.rb +++ b/config/default.rb @@ -17,7 +17,7 @@ Vagrant.configure("2") do |config| config.vm.guest = :linux # Share SSH locally by default - config.vm.network :forwarded_port, 22, 2222, :id => "ssh", :auto => true + config.vm.network :forwarded_port, 2222, 22, :id => "ssh", :auto => true # Share the root folder. This can then be overridden by # other Vagrantfiles, if they wish. diff --git a/plugins/providers/virtualbox/driver/version_4_2.rb b/plugins/providers/virtualbox/driver/version_4_2.rb index 9510dfc8f..d8e9586a2 100644 --- a/plugins/providers/virtualbox/driver/version_4_2.rb +++ b/plugins/providers/virtualbox/driver/version_4_2.rb @@ -73,8 +73,8 @@ module VagrantPlugins execute("list", "vms").split("\n").each do |line| if line =~ /^".+?"\s+\{(.+?)\}$/ info = execute("showvminfo", $1.to_s, "--machinereadable", :retryable => true) - info.split("\n").each do |line| - if line =~ /^hostonlyadapter\d+="(.+?)"$/ + info.split("\n").each do |inner_line| + if inner_line =~ /^hostonlyadapter\d+="(.+?)"$/ networks.delete($1.to_s) end end