diff --git a/link/serial.fnl b/link/serial.fnl index c06a7c7..069973a 100644 --- a/link/serial.fnl +++ b/link/serial.fnl @@ -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 ...] diff --git a/main.lua b/main.lua index 739f789..e7b4c91 100644 --- a/main.lua +++ b/main.lua @@ -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(...)