Breaks Windows hosts file line length rules
Closed this issue · 3 comments
Per goodhosts/vagrant#28, Windows only supports 9 aliases per line in the hosts file. While the specifics of what Windows will or won't support don't seem to be super well documented, I also don't see explicit documented support for multiple aliases per line.
In my experience, too many entries on a single line does prevent aliases further down the line from working.
There may be a need to force each entry onto its own line.
Windows 10 Home, v21H1, OS build 19043.1387
We did a bit of that work here: goodhosts/hostsfile#18
We added https://github.com/goodhosts/cli/blob/main/cmd/clean.go#L46 this so you can do a goodhosts clean --hosts-per-line 1
after you write the hosts file. Does that solve your issues? We could set the default to 1 but we all agreed on 9 for the time being.
The context in which I'm using goodhosts is the vagrant plugin, which is not defaulting to 9 at this time (1.1.1) and does not have a config option for hosts per line.
https://github.com/goodhosts/vagrant/releases/tag/1.1.2 this should do it for you, closing the issue for now but feel free to reopen if it doesnt do what you need