added cmd.ErrOrStderr()

Signed-off-by: Ayush Tiwari <55987406+ayushontop@users.noreply.github.com>
pull/30842/head
Ayush Tiwari 5 months ago committed by GitHub
parent 95328ea0a6
commit e63cbae886
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -39,7 +39,7 @@ 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 {
fmt.Fprintln(out, "no repositories to show")
fmt.Fprintln(cmd.ErrOrStderr(), "no repositories to show")
return nil
}

Loading…
Cancel
Save