summaryrefslogtreecommitdiff
path: root/xmake/core/_xmake_main.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2021-10-09 23:58:21 +0800
committerruki <[email protected]>2021-10-09 23:58:21 +0800
commit1af0820871a06217312fcee22b68e15954fc553a (patch)
tree5eb9e9b0f96089bebc18256ae3cc6644975d8112 /xmake/core/_xmake_main.lua
parentf35f6e15e13a4e5a360b94148534623b6a9c5feb (diff)
fix some errors for lua5.4
Diffstat (limited to 'xmake/core/_xmake_main.lua')
-rw-r--r--xmake/core/_xmake_main.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/core/_xmake_main.lua b/xmake/core/_xmake_main.lua
index cf82a5a9c..b35768058 100644
--- a/xmake/core/_xmake_main.lua
+++ b/xmake/core/_xmake_main.lua
@@ -120,8 +120,8 @@ function loadfile(filepath, mode, opt)
return script, errors
end
--- init package path
-table.insert(package.loaders, 2, function(v)
+-- init package path, package.searchers for lua5.4
+table.insert(package.loaders or package.searchers, 2, function(v)
local filepath = xmake._PROGRAM_DIR .. "/core/" .. v .. ".lua"
local script, serr = _loadfile_impl(filepath)
if not script then