diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index 5e2953969..f3a6e8e6f 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -506,6 +506,10 @@ func (m *Manager) ensureMissingRepos(repoNames map[string]string, deps []*chart. var ru []*repo.Entry for _, dd := range deps { + chartName := dd.Name + if dd.Alias != "" { + chartName = dd.Alias + } // If the chart is in the local charts directory no repository needs // to be specified. @@ -514,7 +518,7 @@ func (m *Manager) ensureMissingRepos(repoNames map[string]string, deps []*chart. } // When the repoName for a dependency is known we can skip ensuring - if _, ok := repoNames[dd.Name]; ok { + if _, ok := repoNames[chartName]; ok { continue } @@ -530,7 +534,7 @@ func (m *Manager) ensureMissingRepos(repoNames map[string]string, deps []*chart. } rn = managerKeyPrefix + rn - repoNames[dd.Name] = rn + repoNames[chartName] = rn // Assuming the repository is generally available. For Helm managed // access controls the repository needs to be added through the user