You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run the command with a misspelled flag: bin/dev my:command --hekp
Notice that --hekp is parsed as a arg 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 if strict = 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 in v2, will add GitHub label.
The text was updated successfully, but these errors were encountered:
mdonnalley
changed the title
Adding strict=false parses a non-existing flag as a vararg
Adding strict=false parses a non-existing flag as a argOct 28, 2022
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: