Fix ordering of forwarded_port call

This commit is contained in:
Mitchell Hashimoto 2013-01-04 16:35:13 -10:00
parent 559cf25b5f
commit 7a9363e8a1
2 changed files with 3 additions and 3 deletions

View File

@ -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.

View File

@ -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