fix(helm): print msg and exit when list has no results

pull/708/head
Matt Butcher 9 years ago
parent 5e1ef0ce86
commit 6235bf5085

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