davetron5000 / optparse-plus

Start your command line scripts off right in Ruby
http://davetron5000.github.com/optparse-plus
Apache License 2.0
521 stars 54 forks source link

Allow absolute config files (#87) #88

Closed johnl closed 9 years ago

johnl commented 9 years ago

Use File.expand_path instead of File.join in defaults_from_config_file to allow absolute paths.

Relative paths will still be relative to HOME. Additionally, ~ expansion is now also possible.

It seems reasonable to me that nobody will be using leading slashes for their config filenames so far, so it should be safe to assume that when they do, they want absolute paths.

However, to be safe you might want to consider this a API change.

davetron5000 commented 9 years ago

Those errors seem spurious. Overall this looks good and I agree that no one was likely using /foo.rc

davetron5000 commented 9 years ago

Can you merge in master to your branch and re-push? If that doesn't fix the build issue, I'll just merge this and sort it out

davetron5000 commented 9 years ago

I went ahead and merged it. Thanks for doing this!