mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-13 09:18:05 -04:00
allow soft interrupts to stop cp
This commit is contained in:
parent
aa422bf21a
commit
a4850a5ff1
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user