Merge pull request #1607 from fiunchinho/feature/repo_url_trailing_slash

Feature/repo url trailing slash
pull/1621/head
Matt Butcher 8 years ago committed by GitHub
commit bedb32eec8

@ -226,7 +226,7 @@ func (m *Manager) hasAllRepos(deps []*chartutil.Dependency) error {
found = true
} else {
for _, repo := range repos {
if urlsAreEqual(repo.URL, dd.Repository) {
if urlsAreEqual(repo.URL, strings.TrimSuffix(dd.Repository, "/")) {
found = true
}
}

@ -20,6 +20,7 @@ import (
"fmt"
"io"
"path/filepath"
"strings"
"github.com/spf13/cobra"
@ -95,7 +96,7 @@ func insertRepoLine(name, url string, home helmpath.Home) error {
}
f.Add(&repo.Entry{
Name: name,
URL: url,
URL: strings.TrimSuffix(url, "/"),
Cache: filepath.Base(cif),
})
return f.WriteFile(home.RepositoryFile(), 0644)

Loading…
Cancel
Save