From 5a5144d4d7eb5d98314e34e05d863ec7739e2ba2 Mon Sep 17 00:00:00 2001 From: Ryan Payton Date: Thu, 7 Sep 2017 12:57:23 -0700 Subject: [PATCH] updating DownloadIndexFile function call to pass in HELM_HOME --- cmd/helm/init.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/helm/init.go b/cmd/helm/init.go index cc70c45ba..680cb417b 100644 --- a/cmd/helm/init.go +++ b/cmd/helm/init.go @@ -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()) }