Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
natasha41575 committed Jul 15, 2022
1 parent d5bafe9 commit 12cae32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/filters/replacement/replacement.go
Expand Up @@ -4,10 +4,10 @@
package replacement

import (
"errors"
"fmt"
"strings"

"github.com/go-errors/errors"
"sigs.k8s.io/kustomize/api/internal/utils"
"sigs.k8s.io/kustomize/api/resource"
"sigs.k8s.io/kustomize/api/types"
Expand Down Expand Up @@ -196,7 +196,7 @@ func copyValueToTarget(target *yaml.RNode, value *yaml.RNode, selector *types.Ta
// may return multiple fields, always wrapped in a sequence node
foundFieldSequence, lookupErr := target.Pipe(&yaml.PathMatcher{Path: fieldPath})
if lookupErr != nil {
return errors.WrapPrefix(lookupErr, "error finding field in replacement target", 0)
return fmt.Errorf("error finding field in replacement target: %w", lookupErr)
}
targetFields, err = foundFieldSequence.Elements()
}
Expand Down

0 comments on commit 12cae32

Please sign in to comment.