kong
kong copied to clipboard
existingdir with default is tested even on --help
All existingdir with default values are tested even on commands not run or with --help
Example run:
./test --help test: error: --dest: stat /foo: no such file or directory
Got hit by the same issue.
Related: #26
Actually this is slightly different - help should work no matter what :(
Yes, they are not exactly the same.
Opened https://github.com/alecthomas/kong/pull/298 as a draft to potentially resolve this issue. Please let me know if there's any unintended consequences of addressing it this way.
This also happens without default value. If you configure it as optional, is tested anyways
cc @alecthomas should https://github.com/alecthomas/kong/pull/298 have closed this?
Yes I think so. If someone can test, let's close it!
Yes I think so. If someone can test, let's close it!
I introduced this test to hopefully capture this, and the fix "works for me".
cc @mitar @cxtuttle could either of you confirm that this appears to work for you as well?
I'm seeing a similar behavior with a kong.VersionFlag not working if the default value for an existingfile does not exist.
I'm seeing a similar behavior with a
kong.VersionFlagnot working if the default value for anexistingfiledoes not exist.
Thanks @douglaswth, I think https://github.com/alecthomas/kong/pull/321 should address that.