Skip to content

Commit 0811d85

Browse files
committed
Fix new line character for Windows hosts file
1 parent 1fad917 commit 0811d85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

virtualhost.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ if [ "$action" == 'create' ]
105105
### Add domain in /mnt/c/Windows/System32/drivers/etc/hosts (Windows Subsytem for Linux)
106106
if [ -e /mnt/c/Windows/System32/drivers/etc/hosts ]
107107
then
108-
if ! echo "127.0.0.1 $domain" >> /mnt/c/Windows/System32/drivers/etc/hosts
108+
if ! echo -e "\r127.0.0.1 $domain" >> /mnt/c/Windows/System32/drivers/etc/hosts
109109
then
110110
echo $"ERROR: Not able to write in /mnt/c/Windows/System32/drivers/etc/hosts (Hint: Try running Bash as administrator)"
111111
else

0 commit comments

Comments
 (0)