From 7fc84f6abaac95b4c67a8fed500e5971106609d8 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Mon, 2 Nov 2026 20:49:31 -1000 Subject: Name a missing Lua module in the error log --- custom/extensions/about-render.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'custom/extensions/about-render.lua') diff --git a/custom/extensions/about-render.lua b/custom/extensions/about-render.lua index 35f30d0..e3747ec 100644 --- a/custom/extensions/about-render.lua +++ b/custom/extensions/about-render.lua @@ -10,7 +10,8 @@ -- about-filter=lua:/usr/local/lib/cgit/filters/about-render.lua -- Markdown and man pages need lpeg, built for the Lua cgit is linked --- against. Without it both fall back to escaped plain text. +-- against. Without it both fall back to escaped plain text, and the error +-- log says so. -- -- # Debian and Ubuntu -- sudo apt install lua-lpeg @@ -21,6 +22,9 @@ -- # or with LuaRocks, matched to your Lua version -- sudo luarocks --lua-version 5.1 install lpeg local has_lpeg, lpeg = pcall(require, "lpeg") +if not has_lpeg then + io.stderr:write("[cgit] Unable to load lpeg, so markdown and man pages show as plain text\n") +end -- Readmes larger than this are served as escaped plain text rather than -- cgit 2.12.1