-
Notifications
You must be signed in to change notification settings - Fork 69
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
Adding strict=false
parses a non-existing flag as a arg
#526
Comments
mdonnalley
changed the title
Adding
Adding Oct 28, 2022
strict=false
parses a non-existing flag as a vararg
strict=false
parses a non-existing flag as a arg
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When you disable argument validation with
static strict = false
it causes non-existing or misspelled flags to be parsed as args.To Reproduce
static strict = false;
to a command (docs)bin/dev my:command --hekp
--hekp
is parsed as aarg
instead of getting a warning such as:Flag '--hekp' does not exist
Expected behavior
I think that it makes the most sense to treat all arguments that start with hyphens (
-
or--
) as flags even ifstrict = false
is used.Additional context
This would very likely be a breaking change. Someone out there may be using
args
that start with hyphens. Let's fix this inv2
, will add GitHub label.The text was updated successfully, but these errors were encountered: