From 680254681efceb19de7d0cb0e6dbf3a32be0db78 Mon Sep 17 00:00:00 2001 From: joe2far Date: Fri, 26 Aug 2016 13:35:08 +0100 Subject: [PATCH] fix(helm): make repo index not require repo_url --- cmd/helm/repo.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/helm/repo.go b/cmd/helm/repo.go index 73c6b0235..20bcfbe33 100644 --- a/cmd/helm/repo.go +++ b/cmd/helm/repo.go @@ -107,7 +107,7 @@ func runRepoRemove(cmd *cobra.Command, args []string) error { } func runRepoIndex(cmd *cobra.Command, args []string) error { - if err := checkArgsLength(2, len(args), "path to a directory", "url of chart repository"); err != nil { + if err := checkArgsLength(1, len(args), "path to a directory"); err != nil { return err } @@ -115,8 +115,12 @@ func runRepoIndex(cmd *cobra.Command, args []string) error { if err != nil { return err } + url := "" + if len(args) == 2 { + url = args[1] + } - return index(path, args[1]) + return index(path, url) } func index(dir, url string) error {