mirror of
https://github.com/goodhosts/cli.git
synced 2026-04-27 07:06:00 +03:00
[GH-ISSUE #33] Breaks Windows hosts file line length rules #16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ethanclevenger91 on GitHub (Dec 7, 2021).
Original GitHub issue: https://github.com/goodhosts/cli/issues/33
Per https://github.com/goodhosts/vagrant/issues/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
@luthermonson commented on GitHub (Dec 9, 2021):
We did a bit of that work here: https://github.com/goodhosts/hostsfile/issues/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 1after 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.@ethanclevenger91 commented on GitHub (Dec 16, 2021):
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.
@luthermonson commented on GitHub (Dec 19, 2021):
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