Mod: raise an error if the mod does not exist

This commit is contained in:
Van
2026-05-14 22:16:41 +03:00
parent 1a97abe49e
commit ac8cb8a99f

View File

@@ -23,6 +23,7 @@ function Mod.getInfo(modname)
local name = modname or core.get_current_modname()
local shortName = getShortModName(name)
local path = core.get_modpath(name)
assert(path ~= nil, ('A mod `%s` does not exist.'):format(name))
local require = Require.getModRequire(name, path)
return {name = name, shortName = shortName, path = path, require = require}