Remove trailing slash (if any) from repo url

pull/1607/head
José Armesto 9 years ago
parent 560964766b
commit c340c04e21

@ -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