diff --git a/api/internal/builtins/HelmChartInflationGenerator.go b/api/internal/builtins/HelmChartInflationGenerator.go index 06d13b5261..179bdf1940 100644 --- a/api/internal/builtins/HelmChartInflationGenerator.go +++ b/api/internal/builtins/HelmChartInflationGenerator.go @@ -153,7 +153,7 @@ func (p *HelmChartInflationGeneratorPlugin) absChartHome() string { chartHome = filepath.Join(p.h.Loader().Root(), p.ChartHome) } - if p.Version != "" && p.Repo != "" { + if p.Version != "" { return filepath.Join(chartHome, fmt.Sprintf("%s-%s", p.Name, p.Version)) } return chartHome diff --git a/plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator.go b/plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator.go index 88527fe074..857223eca3 100644 --- a/plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator.go +++ b/plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator.go @@ -159,7 +159,7 @@ func (p *plugin) absChartHome() string { chartHome = filepath.Join(p.h.Loader().Root(), p.ChartHome) } - if p.Version != "" && p.Repo != "" { + if p.Version != "" { return filepath.Join(chartHome, fmt.Sprintf("%s-%s", p.Name, p.Version)) } return chartHome diff --git a/plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator_test.go b/plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator_test.go index e6b414e9ec..036786bed5 100644 --- a/plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator_test.go +++ b/plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator_test.go @@ -849,7 +849,7 @@ releaseName: %s assert.True(t, len(rm.Resources()) > 0) var chartDir string - if tt.version != "" && tt.repo != "" { + if tt.version != "" { chartDir = fmt.Sprintf("charts/%s-%s/%s", tt.chartName, tt.version, tt.chartName) } else { chartDir = fmt.Sprintf("charts/%s", tt.chartName)