From 71d6cb70e42cd9d18bfd41501a151219c956ce1a Mon Sep 17 00:00:00 2001 From: Kay Yan Date: Wed, 9 Mar 2022 21:51:43 +0800 Subject: [PATCH] Fix Inconsistent helm repo list behavior Signed-off-by: Kay Yan --- cmd/helm/repo_list.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/helm/repo_list.go b/cmd/helm/repo_list.go index efaf74155..93bece351 100644 --- a/cmd/helm/repo_list.go +++ b/cmd/helm/repo_list.go @@ -39,7 +39,7 @@ func newRepoListCmd(out io.Writer) *cobra.Command { ValidArgsFunction: noCompletions, RunE: func(cmd *cobra.Command, args []string) error { f, err := repo.LoadFile(settings.RepositoryConfig) - if isNotExist(err) || (len(f.Repositories) == 0 && !(outfmt == output.JSON || outfmt == output.YAML)) { + if (isNotExist(err) || len(f.Repositories) == 0) && !(outfmt == output.JSON || outfmt == output.YAML) { return errors.New("no repositories to show") }