Cleanup from rige's review
This commit is contained in:
parent
1c0fdfe660
commit
05f5141734
|
@ -71,10 +71,16 @@ func GetCheckPassword(prompt, prompt2 string) (string, error) {
|
|||
return pass, nil
|
||||
}
|
||||
|
||||
// inputIsTty returns true iff we have an interactive prompt,
|
||||
// where we can disable echo and request to repeat the password.
|
||||
// If false, we can optimize for piped input from another command
|
||||
func inputIsTty() bool {
|
||||
return isatty.IsTerminal(os.Stdin.Fd()) || isatty.IsCygwinTerminal(os.Stdin.Fd())
|
||||
}
|
||||
|
||||
// stdinPassword reads one line from stdin.
|
||||
// Subsequent calls reuse the same buffer, so we don't lose
|
||||
// any input when reading a password twice (to verify)
|
||||
func stdinPassword() (string, error) {
|
||||
if buf == nil {
|
||||
buf = bufio.NewReader(os.Stdin)
|
||||
|
|
|
@ -60,7 +60,7 @@ func sendTx(cmd *cobra.Command, args []string) error {
|
|||
result.CheckTx.Log)
|
||||
}
|
||||
if result.DeliverTx.Code != uint32(0) {
|
||||
return errors.Errorf("CheckTx failed: (%d) %s",
|
||||
return errors.Errorf("DeliverTx failed: (%d) %s",
|
||||
result.DeliverTx.Code,
|
||||
result.DeliverTx.Log)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue