fix: handle error if exec fails

This commit is contained in:
fiplox 2023-01-29 13:59:41 +01:00
parent 66d68fea35
commit 29c303535e
1 changed files with 3 additions and 0 deletions

View File

@ -94,6 +94,9 @@ if os.getenv 'SSH_TTY' then
MapDHM() MapDHM()
else else
local handle = io.popen 'lsusb | grep -c Sofle' local handle = io.popen 'lsusb | grep -c Sofle'
if handle == nil then
return
end
local automap = handle:read '*n' local automap = handle:read '*n'
handle:close() handle:close()
if automap == 1 then if automap == 1 then