From 41a508f5388bf05c990821be7ac9b702de02b5b2 Mon Sep 17 00:00:00 2001 From: SataQiu Date: Mon, 25 Dec 2023 17:28:34 +0800 Subject: [PATCH] kubeadm: print supported shell types in error message for 'kubeadm completion' --- cmd/kubeadm/app/cmd/completion.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/kubeadm/app/cmd/completion.go b/cmd/kubeadm/app/cmd/completion.go index 22067ade00a..7c3d3090a8b 100644 --- a/cmd/kubeadm/app/cmd/completion.go +++ b/cmd/kubeadm/app/cmd/completion.go @@ -122,7 +122,7 @@ func RunCompletion(out io.Writer, boilerPlate string, cmd *cobra.Command, args [ } run, found := completionShells[args[0]] if !found { - return errors.Errorf("unsupported shell type %q", args[0]) + return errors.Errorf("unsupported shell type %q, the supported shell types are %v", args[0], GetSupportedShells()) } if len(boilerPlate) == 0 {