Skip to content

Commit

Permalink
fix kustomize 4.5.3+ breaking remote resources (4559)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-Bilal committed Apr 23, 2022
1 parent a464ed0 commit 66e4e15
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions api/internal/target/kusttarget.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,11 +411,11 @@ func (kt *KustTarget) accumulateResources(
if errors.Is(errF, load.ErrorHTTP) {
return nil, errF
}
if kusterr.IsMalformedYAMLError(errF) { // Some error occurred while tyring to decode YAML file
return nil, errF
}
ldr, err := kt.ldr.New(path)
if err != nil {
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())
}
Expand All @@ -430,6 +430,9 @@ func (kt *KustTarget) accumulateResources(
ra, err = kt.accumulateDirectory(ra, ldr, false)
}
if err != nil {
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())
}
Expand Down

0 comments on commit 66e4e15

Please sign in to comment.