Merge pull request #103 from thematthopkins/windows_hostnames_length_fix

splits hostnames across many lines

Closes #60.
This commit is contained in:
Paulo Bittencourt 2014-07-21 21:28:34 -04:00
commit 6a1dcf0a17
1 changed files with 2 additions and 2 deletions

View File

@ -83,9 +83,9 @@ module VagrantPlugins
def get_hosts_file_entry(machine, resolving_machine)
ip = get_ip_address(machine, resolving_machine)
host = machine.config.vm.hostname || machine.name
aliases = machine.config.hostmanager.aliases.join(' ').chomp
aliases = machine.config.hostmanager.aliases
if ip != nil
"#{ip}\t#{host} #{aliases}\n"
"#{ip}\t#{host}\n" + aliases.map{|a| "#{ip}\t#{a}"}.join("\n") + "\n"
end
end