From 840550495335b0dea3d700a9c1531b5ac2026dc5 Mon Sep 17 00:00:00 2001 From: vaikas-google Date: Wed, 1 Jun 2016 15:45:05 -0700 Subject: [PATCH] do not return errors and do not print any messages about no matches found to be more like unix commands --- cmd/helm/list.go | 5 +---- cmd/helm/search.go | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/cmd/helm/list.go b/cmd/helm/list.go index 2a8751845..51daae61c 100644 --- a/cmd/helm/list.go +++ b/cmd/helm/list.go @@ -1,7 +1,6 @@ package main import ( - "errors" "fmt" "strings" @@ -64,8 +63,6 @@ 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 { @@ -88,7 +85,7 @@ func listCmd(cmd *cobra.Command, args []string) error { } if len(res.Releases) == 0 { - return errListNoReleases + return nil } if res.Next != "" { diff --git a/cmd/helm/search.go b/cmd/helm/search.go index 3d7ba0d2a..1959deab9 100644 --- a/cmd/helm/search.go +++ b/cmd/helm/search.go @@ -35,8 +35,6 @@ func search(cmd *cobra.Command, args []string) error { for _, result := range results { fmt.Println(result) } - } else { - return errors.New("No matches found") } return nil }