Skip to content

Commit 6a1dcf0

Browse files
committed
Merge pull request #103 from thematthopkins/windows_hostnames_length_fix
splits hostnames across many lines Closes #60.
2 parents 936e7e4 + db958df commit 6a1dcf0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/vagrant-hostmanager/hosts_file.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ def update_content(file_content, resolving_machine, include_id)
8383
def get_hosts_file_entry(machine, resolving_machine)
8484
ip = get_ip_address(machine, resolving_machine)
8585
host = machine.config.vm.hostname || machine.name
86-
aliases = machine.config.hostmanager.aliases.join(' ').chomp
86+
aliases = machine.config.hostmanager.aliases
8787
if ip != nil
88-
"#{ip}\t#{host} #{aliases}\n"
88+
"#{ip}\t#{host}\n" + aliases.map{|a| "#{ip}\t#{a}"}.join("\n") + "\n"
8989
end
9090
end
9191

0 commit comments

Comments
 (0)