agiledivider / vagrant-hostsupdater

MIT License
1.15k stars 130 forks source link

Sudoers file not working on MacOS #145

Closed andypattenden closed 6 years ago

andypattenden commented 6 years ago

The snippet for the sudoers file on the README is not working on MacOS for adding hosts. I'm currently on 10.13.2

Changing the add line from:

Cmnd_Alias VAGRANT_HOSTS_ADD = /bin/sh -c 'echo "*" >> /etc/hosts'

to:

Cmnd_Alias VAGRANT_HOSTS_ADD = /bin/sh -c echo "*" >> /etc/hosts

resolves the issue.

I would raise a PR with the fix but I'm not able to verify that removing the single-quotes doesn't break other OSs

danepowell commented 6 years ago

Thanks for finding this, see #146