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>
This commit is contained in:
Marc Khouzam 2019-11-08 17:22:47 -05:00
parent 865c46c014
commit 30e8ed2f3d

View file

@ -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))