From 897824bb272b8ff0da94e93aa349a7633924aebd Mon Sep 17 00:00:00 2001 From: Fabian Burth Date: Fri, 10 Nov 2023 15:49:39 +0100 Subject: [PATCH] Fix Helm Downloader Credential Handling (#571) * fix credential not being used * restructure nested if --- pkg/helm/downloader.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/helm/downloader.go b/pkg/helm/downloader.go index 33c45e6c25..9b399e781d 100644 --- a/pkg/helm/downloader.go +++ b/pkg/helm/downloader.go @@ -105,12 +105,12 @@ func DownloadChart(out common.Printer, ctx oci.ContextProvider, ref, version, re func (d *chartDownloader) complete(ctx oci.ContextProvider, ref, repourl string) error { rf := repo.NewFile() - creds := d.creds if d.creds == nil { d.creds = identity.GetCredentials(ctx.OCIContext(), repourl, ref) - if d.creds == nil { - creds = common.Properties{} - } + } + creds := d.creds + if creds == nil { + creds = common.Properties{} } config := vfs.Join(d.fs, d.root, ".config")