Skip to content

Commit

Permalink
revert changes to error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mightyguava committed Sep 17, 2022
1 parent 3217f9a commit 4c0bf39
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions api/internal/target/kusttarget.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,16 +412,11 @@ func (kt *KustTarget) accumulateResources(
}
ldr, err := kt.ldr.New(path)
if err != nil {
if strings.Contains(err.Error(), load.ErrRtNotDir.Error()) { // Was neither a remote resource nor a local directory.
if kusterr.IsMalformedYAMLError(errF) {
// Some error occurred while tyring to decode YAML file
return nil, errF
}
return nil, errors.Wrapf(
err, "accumulation err='%s'", errF.Error())
if kusterr.IsMalformedYAMLError(errF) { // Some error occurred while tyring to decode YAML file
return nil, errF
}
return nil, errors.Wrapf(
err, "accumulating remote resource: %s", path)
err, "accumulation err='%s'", errF.Error())
}
// store the origin, we'll need it later
origin := kt.origin.Copy()
Expand Down

0 comments on commit 4c0bf39

Please sign in to comment.