Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If hosts file was edited previously and was not saved on a new line, the first entry wont work #3

Open
WoodroweBones opened this issue Mar 26, 2024 · 0 comments

Comments

@WoodroweBones
Copy link

It appears the script expects a fresh hosts file that is saved so that any addition will be on a brand new line. If the hosts file was previously edited and someone deleted the empty line it will append on the same line as the last entry. Example:

::1 localhost192.168.1.1 home

I'm not a powershell wizard but I'm guessing there might be a way to check if there is fresh CRLF before appending?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant