From 058bc083a862a11f5c94be7444b9bfddb1156409 Mon Sep 17 00:00:00 2001 From: Ayush Tiwari <55987406+ayushontop@users.noreply.github.com> Date: Wed, 7 May 2025 00:38:13 +0530 Subject: [PATCH] changed Error to print Signed-off-by: Ayush Tiwari <55987406+ayushontop@users.noreply.github.com> --- pkg/cmd/repo_list.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/repo_list.go b/pkg/cmd/repo_list.go index 60c879984..fbd0ee8c1 100644 --- a/pkg/cmd/repo_list.go +++ b/pkg/cmd/repo_list.go @@ -40,7 +40,8 @@ func newRepoListCmd(out io.Writer) *cobra.Command { RunE: func(_ *cobra.Command, _ []string) error { f, _ := repo.LoadFile(settings.RepositoryConfig) if len(f.Repositories) == 0 && outfmt != output.JSON && outfmt != output.YAML { - return errors.New("no repositories to show") + fmt.Fprintln(out, "no repositories to show") + return nil } return outfmt.Write(out, &repoListWriter{f.Repositories})