Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Name a missing Lua module in the error log
Diffstat (limited to 'custom/extensions/about-render.lua')
| -rw-r--r-- | custom/extensions/about-render.lua | 6 |
1 file changed, 5 insertions, 1 deletion
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 |
