fix(events): exit on terminate
This commit is contained in:
parent
efc7e88b9b
commit
b070d96de5
@ -1,4 +1,4 @@
|
||||
local _VERSION = '1.0.0';
|
||||
local _VERSION = '1.0.1';
|
||||
|
||||
local command = ...;
|
||||
|
||||
@ -37,6 +37,11 @@ print('Listening events... Press Ctrl+T to stop.');
|
||||
|
||||
while true do
|
||||
local event = table.pack(os.pullEventRaw());
|
||||
|
||||
if event[1] == 'terminate' then
|
||||
return;
|
||||
end
|
||||
|
||||
local parts = {};
|
||||
|
||||
for i = 1, event.n do
|
||||
|
||||
Loading…
Reference in New Issue
Block a user