Closed MasonM closed 3 weeks ago
Fixes #13826
https://github.com/argoproj/argo-workflows/pull/13656 changed all CLI commands to use RunE instead of Run and to use Cobra validators for validating arguments. The default behavior with Cobra is to print the help text for all errors, which can be tedious to scroll through.
RunE
Run
This changes the CLI to only print the help text for argument validation errors, which should match the previous behavior.
$ ./dist/argo submit 'ANYexampleworkflow.yaml' Error: open ANYexampleworkflow.yaml: no such file or directory $ ./dist/argo submit --from workflow/basic 'ANYexampleworkflow.yaml' Error: cannot combine --from with file arguments Usage: argo submit [FILE... | --from `kind/name] [flags] <SNIP>
Fixes #13826
Motivation
https://github.com/argoproj/argo-workflows/pull/13656 changed all CLI commands to use
RunE
instead ofRun
and to use Cobra validators for validating arguments. The default behavior with Cobra is to print the help text for all errors, which can be tedious to scroll through.Modifications
This changes the CLI to only print the help text for argument validation errors, which should match the previous behavior.
Verification