bliss

KISS in Lua
git clone git://bvnf.space/bliss.git
Log | Files | Refs | README | LICENSE

commit 4b05798e5b73f222a11f6ef4d24b8f2e6a0be855
parent 2af0c97b0a4f3f4f91abe6bf32c5f514dca4689e
Author: phoebos <ben@bvnf.space>
Date:   Mon, 11 Nov 2024 21:35:11 +0000

utils.prompt: handle interrupt properly

Diffstat:
Mbliss/utils.lua | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bliss/utils.lua b/bliss/utils.lua @@ -233,7 +233,8 @@ function prompt(env, msg) if msg then log(msg) end log("Continue? Press Enter to continue or Ctrl+C to abort") if env.PROMPT ~= 0 then - io.stdin:read() + local s, err = pcall(io.stdin.read, io.stdin) + if not s then os.exit(false) end end end