Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api/internal/builtins/HelmChartInflationGenerator.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,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
Expand Down Expand Up @@ -361,7 +361,7 @@ func (p *plugin) chartExistsLocally() (string, bool) {
path := filepath.Join(p.absChartHome(), p.Name)
s, err := os.Stat(path)
if err != nil {
return "", false
return path, false
}
return path, s.IsDir()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,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)
Expand Down Expand Up @@ -949,7 +949,7 @@ chartHome: ./charts
require.NoError(t, err)
assert.Equal(t, "bar", cm)

chartDir := filepath.Join(th.GetRoot(), "charts/test-chart")
chartDir := filepath.Join(th.GetRoot(), "charts/test-chart-1.0.0/test-chart")
assert.True(t, th.GetFSys().Exists(chartDir))

chartYamlContent, err := th.GetFSys().ReadFile(filepath.Join(chartDir, "Chart.yaml"))
Expand Down Expand Up @@ -983,7 +983,7 @@ debug: true
require.NoError(t, err)
assert.Equal(t, "bar", cm)

chartDir := filepath.Join(th.GetRoot(), "charts/test-chart")
chartDir := filepath.Join(th.GetRoot(), "charts/test-chart-1.0.0/test-chart")
assert.True(t, th.GetFSys().Exists(chartDir))

chartYamlContent, err := th.GetFSys().ReadFile(filepath.Join(chartDir, "Chart.yaml"))
Expand Down
Loading