From 21d4f153c688f59d02c7cb8d3f076cfafc5a76bd Mon Sep 17 00:00:00 2001 From: Jorge Hernandez <3452489+jhernandezb@users.noreply.github.com> Date: Mon, 6 Dec 2021 05:43:58 -0600 Subject: [PATCH] fix(cosmoscmd): cli default outputs (#22) --- cosmoscmd/root.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cosmoscmd/root.go b/cosmoscmd/root.go index c898ed9..21b9e6f 100644 --- a/cosmoscmd/root.go +++ b/cosmoscmd/root.go @@ -144,6 +144,9 @@ func NewRootCmd( Use: appName + "d", Short: "Stargate CosmosHub App", PersistentPreRunE: func(cmd *cobra.Command, _ []string) error { + // set the default command outputs + cmd.SetOut(cmd.OutOrStdout()) + cmd.SetErr(cmd.ErrOrStderr()) initClientCtx, err := client.ReadPersistentCommandFlags(initClientCtx, cmd.Flags()) if err != nil { return err