Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set proper default command output #8628

Merged
merged 13 commits into from
Apr 17, 2021
6 changes: 6 additions & 0 deletions simapp/simd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) {
a := appCreator{encodingConfig}
server.AddCommands(rootCmd, simapp.DefaultNodeHome, a.newApp, a.appExport, addModuleInitFlags)

// set the default command output properly
rootCmd.PersistentPreRun = func(cmd *cobra.Command, args []string) {
cmd.SetOut(cmd.OutOrStdout())
amaury1093 marked this conversation as resolved.
Show resolved Hide resolved
cmd.SetErr(cmd.ErrOrStderr())
}

// add keybase, auxiliary RPC, query, and tx child commands
rootCmd.AddCommand(
rpc.StatusCommand(),
Expand Down