Skip to content

Commit 8aad552

Browse files
committed
helm: remove temp file name from index cache err
Due to the temporary file having a random suffix, it would result in the notification-controller not rate limiting the messages as they are "unique". For the close error (which also makes use of the name), we keep the information as it might be of importance to figure out why the close failed. Signed-off-by: Hidde Beydals <[email protected]>
1 parent d2eec33 commit 8aad552

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/helm/repository/chart_repository.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ func (r *ChartRepository) CacheIndex() (string, error) {
269269
if err = r.DownloadIndex(mw); err != nil {
270270
f.Close()
271271
os.RemoveAll(f.Name())
272-
return "", fmt.Errorf("failed to cache index to '%s': %w", f.Name(), err)
272+
return "", fmt.Errorf("failed to cache index to temporary file: %w", err)
273273
}
274274
if err = f.Close(); err != nil {
275275
os.RemoveAll(f.Name())

0 commit comments

Comments
 (0)