fix crash on startup when luars232 doesn't load

This commit is contained in:
Jeremy Penner 2021-04-25 14:52:45 -04:00
parent 5b5a2fe35b
commit 8403e58857
2 changed files with 2 additions and 2 deletions

View file

@ -1,5 +1,5 @@
; using https://github.com/srdgame/librs232
(local rs232 (require :luars232))
(local (_ rs232) (pcall #(require :luars232)))
(local command (require "core.command"))
(fn check [err ...]

View file

@ -5,7 +5,7 @@ fv = fennel.view
pp = function(x) print(fv(x)) end
lume = require("lib.lume")
-- these set global variables and can't be required after requiring core.strict
luars232 = require("luars232")
_, luars232 = pcall(function () require("luars232") end)
_coroutine_resume = coroutine.resume
function coroutine.resume(...)