diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a5564e09a57..d3fc751ed8e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -188,6 +188,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/capability) [#15030](https://github.com/cosmos/cosmos-sdk/pull/15030) Prevent `x/capability` from consuming `GasMeter` gas during `InitMemStore` * (types/coin) [#14739](https://github.com/cosmos/cosmos-sdk/pull/14739) Deprecate the method `Coin.IsEqual` in favour of `Coin.Equal`. The difference between the two methods is that the first one results in a panic when denoms are not equal. This panic lead to unexpected behavior * (x/crypto) [#15258](https://github.com/cosmos/cosmos-sdk/pull/15258) Write keyhash file with permissions 0600 instead of 0555. +* (client/keys) [15867](https://github.com/cosmos/cosmos-sdk/pull/15876) Fix the output of the client keys query when there are no keys ### Deprecated diff --git a/client/keys/list.go b/client/keys/list.go index 241c04d8722f..e3b3e4f8aea5 100644 --- a/client/keys/list.go +++ b/client/keys/list.go @@ -1,6 +1,7 @@ package keys import ( + "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" @@ -33,7 +34,7 @@ func runListCmd(cmd *cobra.Command, _ []string) error { return err } - if len(records) == 0 { + if len(records) == 0 && clientCtx.OutputFormat == flags.OutputFormatText { cmd.Println("No records were found in keyring") return nil }