kubeadm:return error info normally

This commit is contained in:
navist2020 2021-05-26 14:50:53 +08:00
parent b496238dd6
commit d98a83bb01

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())
}