Skip to content

Commit

Permalink
[bug] ensure dependencies in Chart.yaml has correct url to registry (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristofferNissen authored Oct 31, 2024
1 parent c8745f9 commit 7866240
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/helm/chart.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 7866240

Please sign in to comment.