EOF aborts shell

This commit is contained in:
Aidan 2020-07-24 20:37:46 -07:00
parent adff10b56a
commit 530dbe7e21
No known key found for this signature in database
GPG key ID: 327711E983899316

View file

@ -149,6 +149,11 @@ func main() {
fmt.Printf(prePrompt)
text, err := line.Prompt(prompt)
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")
continue
}