From dfdc85e18930a3f1643e83c8ed0c514ca85e49fa Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 4 Nov 2025 15:22:24 +0100 Subject: [PATCH] fix(plugin): proper error message when a plugin spec returns more than one value. --- lua/lazy/core/plugin.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/lazy/core/plugin.lua b/lua/lazy/core/plugin.lua index e58e754..6e67f5f 100644 --- a/lua/lazy/core/plugin.lua +++ b/lua/lazy/core/plugin.lua @@ -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