mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Merge pull request #35777 from redhatlinux10/fix-inconsistent-util-package-import
Automatic merge from submit-queue make kubeadm version use kubeadmutil What this PR does / why we need it: this PR makes sure `kubeadmutil.CheckErr()` other than `cmdutil.CheckErr()` is called in `kubeadm version` subcommand. in `version.go`, `RunVersion()` function only returns `nil`, `kubeadmutil.CheckErr()` is enough for this Signed-off-by: redhatlinux10 <ouyang.qinhua@zte.com.cn>
This commit is contained in:
commit
e4b41dd292
@ -22,7 +22,7 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
|
||||
kubeadmutil "k8s.io/kubernetes/cmd/kubeadm/app/util"
|
||||
"k8s.io/kubernetes/pkg/version"
|
||||
)
|
||||
|
||||
@ -32,7 +32,7 @@ func NewCmdVersion(out io.Writer) *cobra.Command {
|
||||
Short: "Print the version of kubeadm",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
err := RunVersion(out, cmd)
|
||||
cmdutil.CheckErr(err)
|
||||
kubeadmutil.CheckErr(err)
|
||||
},
|
||||
}
|
||||
return cmd
|
||||
|
Loading…
Reference in New Issue
Block a user