diff options
| author | ruki <[email protected]> | 2021-10-09 23:58:21 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-10-09 23:58:21 +0800 |
| commit | 1af0820871a06217312fcee22b68e15954fc553a (patch) | |
| tree | 5eb9e9b0f96089bebc18256ae3cc6644975d8112 /xmake/core/_xmake_main.lua | |
| parent | f35f6e15e13a4e5a360b94148534623b6a9c5feb (diff) | |
fix some errors for lua5.4
Diffstat (limited to 'xmake/core/_xmake_main.lua')
| -rw-r--r-- | xmake/core/_xmake_main.lua | 4 |
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 |
