mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
kubeadm: Make exec error message more informative
This commit is contained in:
parent
bb9a12d6f8
commit
4fe0d2107d
@ -33,7 +33,7 @@ func GetKubeletVersion(execer utilsexec.Interface) (*version.Version, error) {
|
|||||||
command := execer.Command("kubelet", "--version")
|
command := execer.Command("kubelet", "--version")
|
||||||
out, err := command.CombinedOutput()
|
out, err := command.CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, errors.Wrap(err, "cannot execute 'kubelet --version'")
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanOutput := strings.TrimSpace(string(out))
|
cleanOutput := strings.TrimSpace(string(out))
|
||||||
|
Loading…
Reference in New Issue
Block a user