Set proper default command output (#8628)

* 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 <mfig@agoric.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
This commit is contained in:
Riccardo Montagnin
2021-04-17 00:21:32 +00:00
committed by GitHub
co-authored by Michael FIG Alessio Treglia Amaury
parent b4fc48ca71
commit 96fe999343
13 changed files with 15 additions and 21 deletions
-1
View File
@@ -17,7 +17,6 @@ func NewVersionCommand() *cobra.Command {
Short: "Print the application binary version information",
RunE: func(cmd *cobra.Command, _ []string) error {
verInfo := NewInfo()
cmd.SetOut(cmd.OutOrStdout())
if long, _ := cmd.Flags().GetBool(flagLong); !long {
cmd.Println(verInfo.Version)