devopsgroup-io / vagrant-hostmanager

:pencil: A Vagrant plugin that manages hosts files within a multi-machine environment.
Mozilla Public License 2.0
1.46k stars 148 forks source link

Prevents duplicate host file records in Windows #264

Closed jalandis closed 6 years ago

jalandis commented 6 years ago

Moves newlines out of quoted header and footer.
Matches carriage return along with newline in hosts file pattern.

Closes #263

Tested with a RedHat 7.4 and Windows guest.

There is still an issue with whitespace duplicated in existing records. The encode method with crlf_newline seems to add a carriage returns every time it is applied.

seth-reeser commented 6 years ago

Thanks, @jalandis!