Merge pull request #97523 from pandaamanda/kubectl_alpha
code cleanup for kubectl alpha -h Kubernetes-commit: ded5726227fbdb8db194050a0df739b2e9ab4858
This commit is contained in:
commit
bd9f627b51
|
|
@ -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"))
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue