-
Notifications
You must be signed in to change notification settings - Fork 549
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
Add support for WSL hosts file #40
Conversation
+1 |
Only issue with this is that it can't actually write to Window's HOSTS file unless you change the permissions on it. I'm told there may be something like |
Interesting, let me make some test to ensure it does not affect other cases. Great contribution 👍 |
Just adjusted this so that it properly writes a Windows-style line ending in the Windows HOSTS file (before it was working, but would behave weirdly if you opened up HOSTS in Windows) |
This change checks if a hosts file exists at
/mnt/c/Windows/System32/drivers/etc/hosts
, and if so, attempts to add or remove the virtual host specified. This makes the script more compatible with Microsoft's Windows Subsystem on Linux.