Skip to content

Commit

Permalink
fix: list keys output for empty keys (backport #15876) (#15894)
Browse files Browse the repository at this point in the history
Co-authored-by: Mantas Vidutis <[email protected]>
Co-authored-by: Julien Robert <[email protected]>
  • Loading branch information
3 people authored Apr 19, 2023
1 parent 967efc6 commit e3fce67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

* (baseapp) [#15789](https://github.com/cosmos/cosmos-sdk/pull/15789) Ensure `PrepareProposal` and `ProcessProposal` respect `InitialHeight` set by CometBFT when set to a value greater than 1.
* (types) [#15433](https://github.com/cosmos/cosmos-sdk/pull/15433) Allow disabling of account address caches (for printing bech32 account addresses).
* (client/keys) [#15876](https://github.com/cosmos/cosmos-sdk/pull/15876) Fix the JSON output `<appd> keys list --output json` when there are no keys.

## [v0.47.1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.1) - 2023-03-23

Expand Down
2 changes: 1 addition & 1 deletion client/keys/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func runListCmd(cmd *cobra.Command, _ []string) error {
return err
}

if len(records) == 0 {
if len(records) == 0 && clientCtx.OutputFormat == OutputFormatJSON {
cmd.Println("No records were found in keyring")
return nil
}
Expand Down

0 comments on commit e3fce67

Please sign in to comment.