mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 02:37:15 +00:00
loader/lua: Remove compat shim for loader.lua_path
loader.lua_path was committed before stable/13 was branched, and merged in to for 12.2. Remove workaround for it not being present. Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D44143
This commit is contained in:
parent
8b9178cd0d
commit
ab97d42add
|
@ -65,13 +65,7 @@ end
|
||||||
-- message on failure.
|
-- message on failure.
|
||||||
function try_include(module)
|
function try_include(module)
|
||||||
if module:sub(1, 1) ~= "/" then
|
if module:sub(1, 1) ~= "/" then
|
||||||
local lua_path = loader.lua_path
|
module = loader.lua_path .. "/" .. module
|
||||||
-- XXX Temporary compat shim; this should be removed once the
|
|
||||||
-- loader.lua_path export has sufficiently spread.
|
|
||||||
if lua_path == nil then
|
|
||||||
lua_path = "/boot/lua"
|
|
||||||
end
|
|
||||||
module = lua_path .. "/" .. module
|
|
||||||
-- We only attempt to append an extension if an absolute path
|
-- We only attempt to append an extension if an absolute path
|
||||||
-- wasn't specified. This assumes that the caller either wants
|
-- wasn't specified. This assumes that the caller either wants
|
||||||
-- to treat this like it would require() and specify just the
|
-- to treat this like it would require() and specify just the
|
||||||
|
|
Loading…
Reference in a new issue