Skip to content

Commit

Permalink
restructure nested if
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianburth committed Nov 9, 2023
1 parent 34f60fa commit 2b76901
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pkg/helm/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +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 = d.creds
} else {
creds = common.Properties{}
}
}
creds := d.creds
if creds == nil {
creds = common.Properties{}
}

config := vfs.Join(d.fs, d.root, ".config")
Expand Down

0 comments on commit 2b76901

Please sign in to comment.