EOF aborts shell
This commit is contained in:
parent
adff10b56a
commit
530dbe7e21
1 changed files with 5 additions and 0 deletions
|
|
@ -149,6 +149,11 @@ func main() {
|
||||||
fmt.Printf(prePrompt)
|
fmt.Printf(prePrompt)
|
||||||
text, err := line.Prompt(prompt)
|
text, err := line.Prompt(prompt)
|
||||||
if err != nil && err != liner.ErrPromptAborted{
|
if err != nil && err != liner.ErrPromptAborted{
|
||||||
|
// must be a better way to do this check
|
||||||
|
if err.Error() == "EOF" {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
log.Log(log.ERR, "couldnt read user input: " + err.Error(), "repl")
|
log.Log(log.ERR, "couldnt read user input: " + err.Error(), "repl")
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue