mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-11-05 00:41:15 +00:00
fix(plugin): proper error message when a plugin spec returns more than one value.
This commit is contained in:
parent
202d8e92b3
commit
dfdc85e189
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue