updating DownloadIndexFile function call to pass in HELM_HOME

pull/2862/head
Ryan Payton 8 years ago
parent 878dacb8ed
commit 5a5144d4d7

@ -295,7 +295,7 @@ func ensureDefaultRepos(home helmpath.Home, out io.Writer, skipRefresh bool) err
if fi, err := os.Stat(repoFile); err != nil {
fmt.Fprintf(out, "Creating %s \n", repoFile)
f := repo.NewRepoFile()
sr, err := initStableRepo(home.CacheIndex(stableRepository), skipRefresh)
sr, err := initStableRepo(home.CacheIndex(stableRepository), skipRefresh, home)
if err != nil {
return err
}
@ -314,7 +314,7 @@ func ensureDefaultRepos(home helmpath.Home, out io.Writer, skipRefresh bool) err
return nil
}
func initStableRepo(cacheFile string, skipRefresh bool) (*repo.Entry, error) {
func initStableRepo(cacheFile string, skipRefresh bool, home helmpath.Home) (*repo.Entry, error) {
c := repo.Entry{
Name: stableRepository,
URL: stableRepositoryURL,
@ -331,7 +331,7 @@ func initStableRepo(cacheFile string, skipRefresh bool) (*repo.Entry, error) {
// In this case, the cacheFile is always absolute. So passing empty string
// is safe.
if err := r.DownloadIndexFile(""); err != nil {
if err := r.DownloadIndexFile(home.String()); err != nil {
return nil, fmt.Errorf("Looks like %q is not a valid chart repository or cannot be reached: %s", stableRepositoryURL, err.Error())
}

Loading…
Cancel
Save