Merge pull request #122477 from SataQiu/fix-20231225

kubeadm: print supported shell types in error message for 'kubeadm completion'
This commit is contained in:
Kubernetes Prow Robot 2023-12-25 17:21:58 +01:00 committed by GitHub
commit 735804dc81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {