From e4f79a42d650c926ea12edb7dbe2efbe1031b723 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 5 Jan 2023 11:31:13 +0100 Subject: [PATCH] fix(util): Util.try can now work without an error message --- lua/lazy/core/util.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazy/core/util.lua b/lua/lazy/core/util.lua index 6724088..48582c0 100644 --- a/lua/lazy/core/util.lua +++ b/lua/lazy/core/util.lua @@ -92,7 +92,7 @@ function M.try(fn, opts) end level = level + 1 end - msg = msg .. "\n\n" .. err + msg = (msg and (msg .. "\n\n") or "") .. err if #trace > 0 then msg = msg .. "\n\n# stacktrace:\n" .. table.concat(trace, "\n") end