fix for file:// dependency chart path resolutions (#510)

Signed-off-by: Eric Klatzer <eric@klatzer.at>
This commit is contained in:
Eric Klatzer
2026-02-14 17:43:30 +01:00
committed by GitHub
parent a355898171
commit 8ecd87d944
3 changed files with 4 additions and 2 deletions

View File

@@ -520,8 +520,7 @@ func storeChart(ctx context.Context, s *store.Layout, cfg v1.Chart, opts *flags.
var err error
if strings.HasPrefix(dep.Repository, "file://") {
depPath := strings.TrimPrefix(dep.Repository, "file://")
subchartPath := filepath.Join(chartPath, depPath)
subchartPath := filepath.Join(chartPath, "charts", dep.Name)
depCfg = v1.Chart{Name: subchartPath, RepoURL: "", Version: ""}
depOpts.ChartOpts.RepoURL = ""

Binary file not shown.

View File

@@ -34,6 +34,9 @@ spec:
version: 1.0.4
- name: rancher-cluster-templates-0.5.2.tgz
repoURL: testdata
- name: chart-with-file-dependency-chart-1.0.0.tgz
repoURL: testdata
add-dependencies: true
---
apiVersion: content.hauler.cattle.io/v1
kind: Files