allow soft interrupts to stop cp

This commit is contained in:
payonel 2016-07-24 21:55:10 -07:00
parent aa422bf21a
commit a4850a5ff1

View File

@ -31,6 +31,9 @@ local result, reason
local function prompt(message)
io.write(message .. " [Y/n] ")
local result = io.read()
if not result then -- closed pipe
os.exit(1)
end
return result and (result == "" or result:sub(1, 1):lower() == "y")
end