Args: false
to stop passing unparsed arguments
#1797
Labels
area/v2
relates to / is being considered for v2
kind/bug
describes or fixes a bug
status/triage
maintainers still need to look into this
My urfave/cli version is
2.25.7
Checklist
Dependency Management
Describe the bug
#1069 requests an option to avoid printing args help when args are not used.
ArgsUsage
allows to customize args message, but when it is empty, the default is being printed.Even with such option, args will still be passed to function when user specifies them by mistake.
The proposal is to add boolean
Args
option that will both turn off the args help message, and will make it an error to pass arguments.To reproduce
https://cli.urfave.org/v2/getting-started/ should error out if
Args: false
and user supplied undefined argument.Observed behavior
Specifying undefined arguments do not make any errors.
Expected behavior
Error out.
Additional context
Want to fix this yourself?
Maybe.
Run
go version
and paste its output hereRun
go env
and paste its output hereThe text was updated successfully, but these errors were encountered: