-
-
Notifications
You must be signed in to change notification settings - Fork 139
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
Combination of required
and enum
cause other sub-command failure
#40
Comments
Are you on master? I fixed some bugs with this recently. |
I am now on master and I still get the same error for
|
juliaogris
added a commit
to juliaogris/kongenum
that referenced
this issue
Nov 20, 2019
Initialise sample code to demonstrate issue (alecthomas/kong#40). Expected behaviour: > go run main.go one X command: one <one-arg> > go run main.go two a command: two <two-arg> Actual behaviour: > go run main.go one X main: error: <two-arg> must be one of "a","b","c" but got "" exit status 1 > go run main.go two a command: two <two-arg>
juliaogris
added a commit
to juliaogris/kongenum
that referenced
this issue
Nov 20, 2019
Initialise sample code to demonstrate issue (alecthomas/kong#40). Expected behaviour: > go run main.go one X command: one <one-arg> > go run main.go two a command: two <two-arg> Actual behaviour: > go run main.go one X main: error: <two-arg> must be one of "a","b","c" but got "" exit status 1 > go run main.go two a command: two <two-arg>
Okay that should be fixed now. Let me know if it's still failing for your use case. |
Confirmed! Thank you very much - great library. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For given sample:
I expect the following behaviour:
However, I get:
When I remove the
enum
tag or replacerequired
withdefault:"a"
in commandtwo
, commandone
behaves as expected.The text was updated successfully, but these errors were encountered: