Commit c340c04e authored by José Armesto's avatar José Armesto

Remove trailing slash (if any) from repo url

parent 56096476
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment