-
Notifications
You must be signed in to change notification settings - Fork 342
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
Strange interaction with Count and cobra #112
Comments
Don't know the cause, but you should differentiate the RootCmd = &cobra.Command{
Use: "root", // instead of "test"
More interesting behavior:
|
I'm kind of poking at this, but |
The bug appears to be that I think the test for |
give me a couple minutes to send a potential patch. |
I believe this would be fixed by spf13/cobra#391 |
@eparis I tried the patch with my original problem and it fixes it - thank you :-) |
This is a temporary fix until this pull request gets merged spf13/cobra#391 See original ticket spf13/pflag#112
Compile this code.
Here is the guts of it
Now run with various arguments
Note this has run the ROOT command not the TEST command
This is OK
Why does this produce an error?
This seems to work though
It is as if the
-v
on it's own eats an argument, but it isn't as simple as that as this works fineThe text was updated successfully, but these errors were encountered: