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

fixed windows compatibility issues for the hosts file #36

Merged
merged 1 commit into from
Aug 29, 2013

Conversation

itaymendel
Copy link
Contributor

hi Shawn, great job on this plugin :)

I found some windows compatibility issue that i fixed.
the hostsfile::update_host didn't deal with a windows based environment, so i added a small if statement.
another thing, that might be a windows thing, but i have no idea, because on a single-vm it worked, but when i added more VMs, it started to happen... in hostfile::update_guest i got error on FileUtils.rm that says that there is no file/directory on the /etc/hosts file. so i added a rescue statement.

i forgot to add it to the request, but the en.yml file need to be updated:
update_host: "Updating /etc/hosts file on host machine (password may be required, on windows run cmd in administrator mode)..."

i have added a 'if windows' for the update_host method, to deal with a windows host machine.
sometimes i had an error on line 17, because the file was no longer there (maybe mv removed it?), so i just added a exception block to catch it. it does nothing, but now it is working for me.
@smdahlen
Copy link
Contributor

@itaymendel Thanks. I'll go ahead and merge. Unfortunately, I cannot test since I do not have a copy of Windows.

smdahlen added a commit that referenced this pull request Aug 29, 2013
fixed windows compatibility issues for the hosts file
@smdahlen smdahlen merged commit 3054b2d into devopsgroup-io:master Aug 29, 2013
@itaymendel
Copy link
Contributor Author

cheers

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

Successfully merging this pull request may close these issues.

None yet

2 participants