-
Notifications
You must be signed in to change notification settings - Fork 3k
Labels
area/cobra-commandCore `cobra.Command` implementationsCore `cobra.Command` implementationskind/bugA bug in cobra; unintended behaviorA bug in cobra; unintended behaviortriage/needs-infoNeeds more investigation from maintainers or more info from the issue providerNeeds more investigation from maintainers or more info from the issue provider
Description
when excuting a root comand , cobra returns success on typos and exit code is 1.
➜ ~ helm notfoundsubcommand
Error: unknown command "notfoundsubcommand" for "helm"
Run 'helm --help' for usage.
➜ ~ echo $?
1
when excuting a subcommand ,cobra returns success on typos but exit code is 0.
➜ ~ helm repo sadd foo https://foo/bar
This command consists of multiple subcommands to interact with chart repositories.
It can be used to add, remove, list, and index chart repositories.
Usage:
helm repo [command]
Available Commands:
add add a chart repository
....
➜ ~ echo $?
0
This issue has come up before and this is related pr.
The related helm pr is here.
gnuletik, dandavison and josh-berry
Metadata
Metadata
Assignees
Labels
area/cobra-commandCore `cobra.Command` implementationsCore `cobra.Command` implementationskind/bugA bug in cobra; unintended behaviorA bug in cobra; unintended behaviortriage/needs-infoNeeds more investigation from maintainers or more info from the issue providerNeeds more investigation from maintainers or more info from the issue provider