From 408449a59adb8c2a31c32fff606676b32ce4552a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 4 Nov 2024 11:46:48 +0100 Subject: [PATCH] fix(rockspec): allow binary lua files. Fixes #1800 --- lua/lazy/pkg/rockspec.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/lazy/pkg/rockspec.lua b/lua/lazy/pkg/rockspec.lua index d7ecfdb..e8ece1b 100644 --- a/lua/lazy/pkg/rockspec.lua +++ b/lua/lazy/pkg/rockspec.lua @@ -224,9 +224,10 @@ end ---@return table? function M.parse(file) local ret = {} - return pcall(function() - loadfile(file, "t", ret)() + local ok = pcall(function() + loadfile(file, nil, ret)() end) and ret or nil + return ok and ret or nil end ---@param plugin LazyPlugin