small fix to package lib; nicer error logging in autorun (location in lib shouldn't be in the message)

This commit is contained in:
Florian Nücke 2014-01-27 18:25:52 +01:00
parent 16a6f69853
commit fc66b63ffe
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ local function onComponentAdded(_, address, componentType)
local function run()
local result, reason = shell.execute(fs.concat(name, "autorun"), _ENV, proxy)
if not result and reason ~= "file not found" then
error(reason)
error(reason, 0)
end
end
if isInitialized then

View File

@ -58,7 +58,7 @@ end
local function pathSearcher(module)
local filepath, reason = package.searchpath(module, package.path)
if filepath then
local loader, reason = loadfile(filepath, "bt", _G), filepath
local loader, reason = loadfile(filepath, "bt", _G)
if loader then
return loader, filepath
else