Merge PR #4919: Fix GetConfirmation User Input Bug
This commit is contained in:
parent
70d50a6a61
commit
91b53f2698
|
@ -78,6 +78,7 @@ longer panics if the store to load contains substores that we didn't explicitly
|
|||
* (cli) [\#4763](https://github.com/cosmos/cosmos-sdk/issues/4763) Fix flag `--min-self-delegation` for staking `EditValidator`
|
||||
* (keys) Fix ledger custom coin type support bug
|
||||
* (simulation) [\#4912](https://github.com/cosmos/cosmos-sdk/issues/4912) Fix SimApp ModuleAccountAddrs to properly return black listed addresses for bank keeper initialization
|
||||
* (cli) [\#4919](https://github.com/cosmos/cosmos-sdk/pull/4919) Don't crash cli if user doesn't answer y/n confirmation request
|
||||
|
||||
## [v0.36.0] - 2019-08-13
|
||||
|
||||
|
|
|
@ -74,7 +74,12 @@ func GetConfirmation(prompt string, buf *bufio.Reader) (bool, error) {
|
|||
return false, err
|
||||
}
|
||||
|
||||
response = strings.ToLower(strings.TrimSpace(response))
|
||||
response = strings.TrimSpace(response)
|
||||
if len(response) == 0 {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
response = strings.ToLower(response)
|
||||
if response[0] == 'y' {
|
||||
return true, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue