From 85ce4968a149cf88e9672dc82ede9e9b6a4c2f1c Mon Sep 17 00:00:00 2001 From: Gabriel Wu Date: Sun, 18 Sep 2022 16:52:49 +0800 Subject: [PATCH] fix: throw EOFError properly (#1227) --- src/wizard/utils.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wizard/utils.jl b/src/wizard/utils.jl index 5c07d6c4b..1307eb4eb 100644 --- a/src/wizard/utils.jl +++ b/src/wizard/utils.jl @@ -33,6 +33,9 @@ function line_prompt(name, msg; ins=stdin, outs=stdout, force_identifier=false, else val = strip(read(_getpass(ins), String)) end + if eof(ins) + throw(EOFError()) + end if !isopen(ins) throw(InterruptException()) end