gael-ian / vagrant-bindfs

A Vagrant plugin to automate bindfs mount in the VM
MIT License
482 stars 37 forks source link

Make version detection not choke on blank space #43

Closed msabramo closed 8 years ago

msabramo commented 8 years ago

People might have stuff that emits junk in /etc/profile or similar files and the code could get a blank string from this and then apparently Gem::Version.correct?("") returns a true value:

irb(main):103:0* puts "version correct" if Gem::Version.correct?(""); Gem::Version.correct?("")
version correct
=> 0

so that makes the code fail with:

...vagrant-bindfs/command.rb:183:in `throw': uncaught throw :version (ArgumentError)

This fixes it so that blank strings are ignored.

Fixes: GH-42

msabramo commented 8 years ago

@gael-ian: Any feedback on this?

msabramo commented 8 years ago

ping

gael-ian commented 8 years ago

Sorry for being so long, the last 2 month have been a long run for me and I just recover recently a functionnal workstation and an internet access.

Your fix have been merged and should be published before the end of the day in a new release. I'll just take some time to look at others issues before.

Thanks you and, again, sorry for waiting

msabramo commented 8 years ago

Great! Thanks! No worries about the wait.