Skip to content

Commit 2498e05

Browse files
committed
only first private_network is used
this will prevent using last private_network for the hostname
1 parent dd924d0 commit 2498e05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/vagrant-hostmanager/hosts_file.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def get_ip_address(machine)
104104
machine.config.vm.networks.each do |network|
105105
key, options = network[0], network[1]
106106
ip = options[:ip] if key == :private_network
107-
next if ip
107+
break if ip
108108
end
109109
end
110110
ip || (machine.ssh_info ? machine.ssh_info[:host] : nil)

0 commit comments

Comments
 (0)