Fix ./?/init.lua not being in package path for Lua 5.3+
This commit is contained in:
parent
c1cbbca543
commit
fdd1024833
@ -691,6 +691,10 @@ class Lua(Program):
|
|||||||
os.path.join(module_path, "?", "init.lua")
|
os.path.join(module_path, "?", "init.lua")
|
||||||
]
|
]
|
||||||
module_path_parts.insert(0 if local_paths_first else 2, os.path.join(".", "?.lua"))
|
module_path_parts.insert(0 if local_paths_first else 2, os.path.join(".", "?.lua"))
|
||||||
|
|
||||||
|
if self.major_version in ["5.3", "5.4"]:
|
||||||
|
module_path_parts.append(os.path.join(".", "?", "init.lua"))
|
||||||
|
|
||||||
self.package_path = ";".join(module_path_parts)
|
self.package_path = ";".join(module_path_parts)
|
||||||
|
|
||||||
cmodule_path = os.path.join(opts.location, "lib", "lua", self.major_version)
|
cmodule_path = os.path.join(opts.location, "lib", "lua", self.major_version)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user