Skip to content

Commit eb0a554

Browse files
committed
internal/helm: ErrChartReference on local load err
If a local reference does not contain a path to a valid file, returning `ErrChartReference` is more correct to signal the reference is invalid. This also indirectly causes the reconciler to signal a Suspend, as the source or resource requires a change before a reattempt might be successful. Signed-off-by: Hidde Beydals <[email protected]>
1 parent 78882b3 commit eb0a554

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/helm/chart/builder_local.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ func (b *localChartBuilder) Build(ctx context.Context, ref Reference, p string,
7777
// to a chart
7878
curMeta, err := LoadChartMetadata(localRef.Path)
7979
if err != nil {
80-
return nil, &BuildError{Reason: ErrChartPull, Err: err}
80+
return nil, &BuildError{Reason: ErrChartReference, Err: err}
8181
}
8282
if err = curMeta.Validate(); err != nil {
83-
return nil, &BuildError{Reason: ErrChartPull, Err: err}
83+
return nil, &BuildError{Reason: ErrChartReference, Err: err}
8484
}
8585

8686
result := &Build{}

0 commit comments

Comments
 (0)