Issue: usage choices are not validated for variadic arguments
#8334
Unanswered
stychu
asked this question in
Troubleshooting and bug reports
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When defining a task with a variadic argument
(var=#true)and a set ofchoices, mise does not appear to validate the input against those choices. It allows any value to be passed through to the task, bypassing the expected validation logic.If I run the task with an invalid choice:
mise run aa "not-a-valid-option"The task executes and prints
not-a-valid-optioninstead of throwing a validation error.The CLI should catch that not-a-valid-option is not in the list of allowed choices (debug, info, warn, error) and exit with an error before executing the run script.
It does not make sense to me it being not validated especially
--helpwill generate the possible options and without variadic on it will validate...Beta Was this translation helpful? Give feedback.
All reactions