Merge pull request #102310 from navist2020/fix/NoErrReturn

kubeadm:return error info correctly
This commit is contained in:
Kubernetes Prow Robot 2021-05-27 08:18:23 -07:00 committed by GitHub
commit f66300ef01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -279,7 +279,7 @@ func RunCreateToken(out io.Writer, client clientset.Interface, cfgPath string, i
}
} else {
if certificateKey != "" {
return errors.Wrap(err, "cannot use --certificate-key without --print-join-command")
return errors.New("cannot use --certificate-key without --print-join-command")
}
fmt.Fprintln(out, internalcfg.BootstrapTokens[0].Token.String())
}