Skip to content

Commit

Permalink
Set proper default command output (cosmos#8628)
Browse files Browse the repository at this point in the history
* Set proper default command output

* Removed duplicated cmd.SetErr(cmd.ErrOrStderr()) and cmd.SetOut(cmd.OutOrStdout())

* Moved command initialization and added CHANGELOG

* fix: groom all uses of cmd.Print*

* Ran make format

Co-authored-by: Michael FIG <[email protected]>
Co-authored-by: Alessio Treglia <[email protected]>
Co-authored-by: Amaury <[email protected]>
  • Loading branch information
4 people authored Apr 17, 2021
1 parent 956d226 commit 7eda745
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions simd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) {
Use: "simd",
Short: "simulation app",
PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {
// set the default command outputs
cmd.SetOut(cmd.OutOrStdout())
cmd.SetErr(cmd.ErrOrStderr())

initClientCtx = client.ReadHomeFlag(initClientCtx, cmd)

initClientCtx, err := config.ReadFromClientConfig(initClientCtx)
Expand Down

0 comments on commit 7eda745

Please sign in to comment.