From 1f9d448283a7915df9d617708468f06ba17aaaa7 Mon Sep 17 00:00:00 2001 From: navist2020 Date: Mon, 21 Jun 2021 16:17:32 +0800 Subject: [PATCH] Use errors.Errorf instead of errors.Wrapf when the err is nil --- cmd/kubeadm/app/cmd/phases/workflow/runner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/kubeadm/app/cmd/phases/workflow/runner.go b/cmd/kubeadm/app/cmd/phases/workflow/runner.go index 2a27b89971e..32e44e5f1d6 100644 --- a/cmd/kubeadm/app/cmd/phases/workflow/runner.go +++ b/cmd/kubeadm/app/cmd/phases/workflow/runner.go @@ -213,7 +213,7 @@ func (e *Runner) Run(args []string) error { // Errors if phases that are meant to create special subcommands only // are wrongly assigned Run Methods if p.RunAllSiblings && (p.RunIf != nil || p.Run != nil) { - return errors.Wrapf(err, "phase marked as RunAllSiblings can not have Run functions %s", p.generatedName) + return errors.Errorf("phase marked as RunAllSiblings can not have Run functions %s", p.generatedName) } // If the phase defines a condition to be checked before executing the phase action.