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")