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

existingdir with default is tested even on --help #190

Open
cxtuttle opened this issue Jul 30, 2021 · 11 comments
Open

existingdir with default is tested even on --help #190

cxtuttle opened this issue Jul 30, 2021 · 11 comments
Labels
duplicate This issue or pull request already exists

Comments

@cxtuttle
Copy link

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

@mitar
Copy link
Contributor

mitar commented Dec 1, 2021

Got hit by the same issue.

@mitar
Copy link
Contributor

mitar commented Dec 1, 2021

Related: #26

@alecthomas alecthomas added the duplicate This issue or pull request already exists label Dec 1, 2021
@alecthomas alecthomas reopened this Dec 1, 2021
@alecthomas
Copy link
Owner

Actually this is slightly different - help should work no matter what :(

@mitar
Copy link
Contributor

mitar commented Dec 1, 2021

Yes, they are not exactly the same.

@pyqlsa
Copy link
Contributor

pyqlsa commented May 1, 2022

Opened #298 as a draft to potentially resolve this issue. Please let me know if there's any unintended consequences of addressing it this way.

@MrMarble
Copy link

MrMarble commented May 3, 2022

This also happens without default value. If you configure it as optional, is tested anyways

@pyqlsa
Copy link
Contributor

pyqlsa commented May 16, 2022

cc @alecthomas should #298 have closed this?

@alecthomas
Copy link
Owner

Yes I think so. If someone can test, let's close it!

@pyqlsa
Copy link
Contributor

pyqlsa commented May 16, 2022

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?

@douglaswth
Copy link

I'm seeing a similar behavior with a kong.VersionFlag not working if the default value for an existingfile does not exist.

@pyqlsa
Copy link
Contributor

pyqlsa commented Jul 28, 2022

I'm seeing a similar behavior with a kong.VersionFlag not working if the default value for an existingfile does not exist.

Thanks @douglaswth, I think #321 should address that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

6 participants