splits hostnames across many lines, as Windows doesn't seem to like more than 8 on a line

This commit is contained in:
Matthew Hopkins 2014-06-09 16:50:23 -04:00
parent 936e7e4567
commit db958dfd67
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