Skip to content

Commit

Permalink
diagnostic messages should go to /dev/stderr (cosmos#6058)
Browse files Browse the repository at this point in the history
Use cmd.PrintErrf() to redirect messages to stderr
wherever applicable.
  • Loading branch information
Alessio Treglia committed Apr 22, 2020
1 parent 72a2dae commit 61753c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/genutil/client/cli/gentx.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func GenTxCmd(ctx *server.Context, cdc *codec.Codec, mbm module.BasicManager, sm
}

if key.GetType() == keyring.TypeOffline || key.GetType() == keyring.TypeMulti {
fmt.Println("Offline key passed in. Use `tx sign` command to sign:")
cmd.PrintErrln("Offline key passed in. Use `tx sign` command to sign.")
return authclient.PrintUnsignedStdTx(txBldr, cliCtx, []sdk.Msg{msg})
}

Expand Down Expand Up @@ -175,7 +175,7 @@ func GenTxCmd(ctx *server.Context, cdc *codec.Codec, mbm module.BasicManager, sm
return errors.Wrap(err, "failed to write signed gen tx")
}

fmt.Fprintf(os.Stderr, "Genesis transaction written to %q\n", outputDocument)
cmd.PrintErrf("Genesis transaction written to %q\n", outputDocument)
return nil

},
Expand Down

0 comments on commit 61753c8

Please sign in to comment.