mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 19:25:20 -04:00
Fixed package module to propagate erros from loading module
This commit is contained in:
parent
ee239fb3e2
commit
a0b5f3ef53
@ -58,7 +58,12 @@ end
|
||||
local function pathSearcher(module)
|
||||
local filepath, reason = package.searchpath(module, package.path)
|
||||
if filepath then
|
||||
return loadfile(filepath, "bt", _G), filepath
|
||||
local loader, reason = loadfile(filepath, "bt", _G), filepath
|
||||
if loader then
|
||||
return loader, filepath
|
||||
else
|
||||
return reason
|
||||
end
|
||||
else
|
||||
return reason
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user