From 78662404738a3810a1245a93abc4c7f9ce893322 Mon Sep 17 00:00:00 2001 From: Christoffer Nissen Date: Thu, 31 Oct 2024 10:35:05 +0100 Subject: [PATCH] [bug] ensure dependencies in Chart.yaml has correct url to registry (#139) --- pkg/helm/chart.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/helm/chart.go b/pkg/helm/chart.go index 8364ec3..a182fef 100644 --- a/pkg/helm/chart.go +++ b/pkg/helm/chart.go @@ -31,6 +31,8 @@ func DependencyToChart(d *chart.Dependency, p *Chart) *Chart { if !strings.HasSuffix(d.Repository, d.Name) { if strings.HasSuffix(d.Repository, "/charts") { d.Repository = d.Repository + "/" + d.Name + } else { + d.Repository = d.Repository + "/charts/" + d.Name } } } @@ -157,7 +159,7 @@ func (c *Chart) modifyRegistryReferences(settings *cli.EnvSettings, newRegistry d.Repository = "" case d.Repository != "": // Change dependency ref to registry being imported to - d.Repository = newRegistry + d.Repository = newRegistry + "/charts/" + d.Name if strings.Contains(d.Version, "*") || strings.Contains(d.Version, "x") { chart := DependencyToChart(d, c)