From 30e8ed2f3df9e776b5a5937d92e8ff45c54f984f Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Fri, 8 Nov 2019 17:22:47 -0500 Subject: [PATCH] fix(cli): helm list was ignoring some errors If the cluster is not reachable, helm list would not report that error. Signed-off-by: Marc Khouzam --- cmd/helm/list.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/helm/list.go b/cmd/helm/list.go index 32501530d..83edfe156 100644 --- a/cmd/helm/list.go +++ b/cmd/helm/list.go @@ -77,12 +77,15 @@ func newListCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { client.SetStateMask() results, err := client.Run() + if err != nil { + return err + } if client.Short { for _, res := range results { fmt.Fprintln(out, res.Name) } - return err + return nil } return outfmt.Write(out, newReleaseListWriter(results))