goGetterChart() downloads to user cache dir instead of working dir

This commit is contained in:
Quan TRAN
2022-02-12 17:52:52 +09:00
committed by Yusuke Kuoka
parent 766b03047c
commit cf02442591
3 changed files with 49 additions and 25 deletions
+2 -4
View File
@@ -40,9 +40,7 @@ type Chartify struct {
}
func (st *HelmState) downloadChartWithGoGetter(r *ReleaseSpec) (string, error) {
pathElems := []string{
remote.DefaultCacheDir,
}
var pathElems []string
if r.Namespace != "" {
pathElems = append(pathElems, r.Namespace)
@@ -70,7 +68,7 @@ func (st *HelmState) goGetterChart(chart, dir, cacheDir string, force bool) (str
return "", fmt.Errorf("Parsing url from dir failed due to error %q.\nContinuing the process assuming this is a regular Helm chart or a local dir.", err.Error())
}
} else {
r := remote.NewRemote(st.logger, st.basePath, st.readFile, directoryExistsAt, fileExistsAt)
r := remote.NewRemote(st.logger, "", st.readFile, directoryExistsAt, fileExistsAt)
fetchedDir, err := r.Fetch(chart, cacheDir)
if err != nil {