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 <marc.khouzam@montreal.ca>
(cherry picked from commit 30e8ed2f3d)
pull/7423/head
Marc Khouzam 5 years ago committed by Matt Farina
parent af1c07015d
commit 0046554040
No known key found for this signature in database
GPG Key ID: 9436E80BFBA46909

@ -77,12 +77,15 @@ func newListCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
client.SetStateMask() client.SetStateMask()
results, err := client.Run() results, err := client.Run()
if err != nil {
return err
}
if client.Short { if client.Short {
for _, res := range results { for _, res := range results {
fmt.Fprintln(out, res.Name) fmt.Fprintln(out, res.Name)
} }
return err return nil
} }
return outfmt.Write(out, newReleaseListWriter(results)) return outfmt.Write(out, newReleaseListWriter(results))

Loading…
Cancel
Save