Skip to content

Commit

Permalink
don't change r.CachePath
Browse files Browse the repository at this point in the history
Signed-off-by: CI <ci@argoproj.com>
(cherry picked from commit 781ddba)
  • Loading branch information
CI authored and mattfarina committed Oct 12, 2022
1 parent 75a1369 commit 9f61b0a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/repo/chartrepo.go
Expand Up @@ -249,14 +249,12 @@ func FindChartInAuthAndTLSAndPassRepoURL(repoURL, username, password, chartName,
if err != nil {
return "", err
}
// Use a random path name so it can be deleted for cleanup.
r.CachePath = helmpath.CachePath(name)
idx, err := r.DownloadIndexFile()
if err != nil {
return "", errors.Wrapf(err, "looks like %q is not a valid chart repository or cannot be reached", repoURL)
}
// Clean up temp files.
defer os.RemoveAll(r.CachePath)
defer os.RemoveAll(filepath.Join(r.CachePath, helmpath.CacheChartsFile(r.Config.Name)))
defer os.RemoveAll(filepath.Join(r.CachePath, helmpath.CacheIndexFile(r.Config.Name)))

// Read the index file for the repository to get chart information and return chart URL
repoIndex, err := LoadIndexFile(idx)
Expand Down

0 comments on commit 9f61b0a

Please sign in to comment.