fix(plugin): proper error message when a plugin spec returns more than one value.

This commit is contained in:
Folke Lemaitre 2025-11-04 15:22:24 +01:00
commit dfdc85e189
No known key found for this signature in database
GPG key ID: 9B52594D560070AB

View file

@ -156,7 +156,11 @@ function Spec:import(spec)
load = function()
local mod, err = loadfile(modpath)
if mod then
return mod()
local ret, foo = mod()
if foo then
return nil, "Spec module returned more than one value. Expected a single value."
end
return ret
else
return nil, err
end