mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-14 01:39:36 -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)
|
local function prompt(message)
|
||||||
io.write(message .. " [Y/n] ")
|
io.write(message .. " [Y/n] ")
|
||||||
local result = io.read()
|
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")
|
return result and (result == "" or result:sub(1, 1):lower() == "y")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user