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

Missing flag prints name of the first flag, not the missing flag. #14

Closed
brendandburns opened this issue Feb 10, 2015 · 4 comments
Closed

Comments

@brendandburns
Copy link

consider a command foo --bar --baz

where --bar is defined, but --baz isn't.

pflag prints unknown flag: --bar even though the actual offending flag is --baz

@ogier
Copy link
Owner

ogier commented Feb 15, 2015

I added a test case trying to reproduce this, but I couldn't manage it. Maybe it has something specific to do with that command line in kubernetes/kubernetes#4247? If you can provide a failing test case that would be great.

@brendandburns
Copy link
Author

Thanks for looking into it, I'm using pflag via cobra commander for CLI,
maybe that's doing something screwy. I'll try to get a repro.

Brendan
On Feb 14, 2015 7:17 PM, "Alex Ogier" notifications@github.com wrote:

I added a test case trying to reproduce this, but I couldn't manage it.
Maybe it has something specific to do with that command line in
kubernetes/kubernetes#4247
kubernetes/kubernetes#4247? If you
can provide a failing test case that would be great.


Reply to this email directly or view it on GitHub
#14 (comment).

@bgrant0607
Copy link

Another case: kubernetes/kubernetes#4758
cc @thockin

@brendandburns
Copy link
Author

Ok, see spf13/cobra#65, this looks like its an issue in the upstream user.

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

No branches or pull requests

3 participants