feat(bootstrap): return error string from C searcher

This commit is contained in:
takase1121 2023-04-26 08:29:57 +08:00
parent 83399280f5
commit 1fd20578ef
No known key found for this signature in database
GPG Key ID: 60EEFFC68EB3031B
1 changed files with 2 additions and 2 deletions

View File

@ -38,8 +38,8 @@ package.cpath =
package.native_plugins = {}
package.searchers = { package.searchers[1], package.searchers[2], function(modname)
local path = package.searchpath(modname, package.cpath)
if not path then return nil end
local path, err = package.searchpath(modname, package.cpath)
if not path then return err end
return system.load_native_plugin, path
end }