Merge pull request #708 from technosophos/fix/helm-list-err

fix(helm): print msg and exit when list has no results
pull/714/head
Matt Butcher 8 years ago
commit fd47cf78dd

@ -1,6 +1,7 @@
package main
import (
"errors"
"fmt"
"strings"
@ -62,6 +63,8 @@ func init() {
RootCommand.AddCommand(listCommand)
}
var errListNoReleases = errors.New("no releases found")
func listCmd(cmd *cobra.Command, args []string) error {
var filter string
if len(args) > 0 {
@ -83,6 +86,10 @@ func listCmd(cmd *cobra.Command, args []string) error {
return prettyError(err)
}
if len(res.Releases) == 0 {
return errListNoReleases
}
if res.Next != "" {
fmt.Printf("\tnext: %s", res.Next)
}

Loading…
Cancel
Save