Merge pull request #1607 from fiunchinho/feature/repo_url_trailing_slash

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

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

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

Loading…
Cancel
Save