fix crash on startup when luars232 doesn't load
This commit is contained in:
parent
5b5a2fe35b
commit
8403e58857
|
@ -1,5 +1,5 @@
|
||||||
; using https://github.com/srdgame/librs232
|
; using https://github.com/srdgame/librs232
|
||||||
(local rs232 (require :luars232))
|
(local (_ rs232) (pcall #(require :luars232)))
|
||||||
(local command (require "core.command"))
|
(local command (require "core.command"))
|
||||||
|
|
||||||
(fn check [err ...]
|
(fn check [err ...]
|
||||||
|
|
2
main.lua
2
main.lua
|
@ -5,7 +5,7 @@ fv = fennel.view
|
||||||
pp = function(x) print(fv(x)) end
|
pp = function(x) print(fv(x)) end
|
||||||
lume = require("lib.lume")
|
lume = require("lib.lume")
|
||||||
-- these set global variables and can't be required after requiring core.strict
|
-- 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
|
_coroutine_resume = coroutine.resume
|
||||||
function coroutine.resume(...)
|
function coroutine.resume(...)
|
||||||
|
|
Loading…
Reference in a new issue