feat(bootstrap): return error string from C searcher

This commit is contained in:
takase1121
2023-08-19 12:45:15 +08:00
parent 6111b071ec
commit c0b1fe348f
+2 -2
View File
@@ -35,8 +35,8 @@ package.cpath =
package.native_plugins = {} package.native_plugins = {}
package.searchers = { package.searchers[1], package.searchers[2], function(modname) package.searchers = { package.searchers[1], package.searchers[2], function(modname)
local path = package.searchpath(modname, package.cpath) local path, err = package.searchpath(modname, package.cpath)
if not path then return nil end if not path then return err end
return system.load_native_plugin, path return system.load_native_plugin, path
end } end }