Merge pull request #97523 from pandaamanda/kubectl_alpha

code cleanup for kubectl alpha -h

Kubernetes-commit: ded5726227fbdb8db194050a0df739b2e9ab4858
This commit is contained in:
Kubernetes Publisher 2021-01-21 08:25:14 -08:00
commit bd9f627b51
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ func NewCmdAlpha(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.
// NewKubeletCommand() will hide the alpha command if it has no subcommands. Overriding
// the help function ensures a reasonable message if someone types the hidden command anyway.
if !cmd.HasSubCommands() {
if !cmd.HasAvailableSubCommands() {
cmd.SetHelpFunc(func(*cobra.Command, []string) {
cmd.Println(i18n.T("No alpha commands are available in this version of kubectl"))
})