Update client.go
Bug fixed : if hitting return instead of filling with a valid value, the CLI crashed (line 796) Change return err by continue to ask a valid value again
This commit is contained in:
parent
5e4e7c6d34
commit
6d32a2f299
@ -795,14 +795,17 @@ uiLoop:
|
|||||||
case "find-count":
|
case "find-count":
|
||||||
afmt.Print("Deals to make (1): ")
|
afmt.Print("Deals to make (1): ")
|
||||||
dealcStr, _, err := rl.ReadLine()
|
dealcStr, _, err := rl.ReadLine()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
printErr(xerrors.Errorf("reading deal count: %w", err))
|
printErr(xerrors.Errorf("reading deal count: %w", err))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
dealCount, err = strconv.ParseInt(string(dealcStr), 10, 64)
|
dealCount, err = strconv.ParseInt(string(dealcStr), 10, 64)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
printErr(xerrors.Errorf("reading deal count: invalid number"))
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
color.Blue(".. Picking miners")
|
color.Blue(".. Picking miners")
|
||||||
|
Loading…
Reference in New Issue
Block a user