Merge pull request #1529 from technosophos/fix/1522-replace-duplicate-entries

fix(helm): replace repo entry instead of duplicating
pull/1549/head
Matt Butcher 9 years ago committed by GitHub
commit 915769b311

@ -113,15 +113,19 @@ func (r *RepoFile) Add(re ...*Entry) {
// entry with the same name doesn't exist in the repo file it will add it.
func (r *RepoFile) Update(re ...*Entry) {
for _, target := range re {
found := false
for j, repo := range r.Repositories {
if repo.Name == target.Name {
r.Repositories[j] = target
found = true
break
}
}
if !found {
r.Add(target)
}
}
}
// Has returns true if the given name is already a repository name.
func (r *RepoFile) Has(name string) bool {

Loading…
Cancel
Save