Skip to content

Commit

Permalink
Merge pull request #103037 from navist2020/cleanup/WrapfToErrorf
Browse files Browse the repository at this point in the history
Use errors.Errorf instead of errors.Wrapf when the err is nil
  • Loading branch information
k8s-ci-robot committed Jun 21, 2021
2 parents 0f4fd72 + 1f9d448 commit e1628da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/kubeadm/app/cmd/phases/workflow/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit e1628da

Please sign in to comment.