mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-11-05 17:01:16 +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()
|
load = function()
|
||||||
local mod, err = loadfile(modpath)
|
local mod, err = loadfile(modpath)
|
||||||
if mod then
|
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
|
else
|
||||||
return nil, err
|
return nil, err
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue