From d79f0746eb2084946dbafca36c8a4899d3600b99 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 746048587f..adc8fbd660 100644 --- a/pkg/helm/downloader.go +++ b/pkg/helm/downloader.go @@ -101,12 +101,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")