New explcheck tools fails on macOS/cygwin (Linux?)

Max Chernoff tex at maxchernoff.ca
Fri Dec 6 16:58:23 CET 2024


Hi Joseph,

On Fri, 2024-12-06 at 10:27 +0000, Joseph Wright wrote:
> Trying the new explcheck tool works from Windows but on macOS and cygwin
> (and likely Linux) fails:
>
> (base) joseph at palladium siunitx % explcheck
> /Library/TeX/texbin/explcheck:3: module 'explcheck-cli' not found:
> 	no field package.preload['explcheck-cli']
> 	no file '/usr/local/share/lua/5.3/explcheck-cli.lua'
> 	no file '/usr/local/share/lua/5.3/explcheck-cli/init.lua'
> 	no file '/usr/local/lib/lua/5.3/explcheck-cli.lua'
> 	no file '/usr/local/lib/lua/5.3/explcheck-cli/init.lua'
> 	no file './explcheck-cli.lua'
> 	no file './explcheck-cli/init.lua'
> 	no file '/usr/local/lib/lua/5.3/explcheck-cli.so'
> 	no file '/usr/local/lib/lua/5.3/loadall.so'
> 	no file './explcheck-cli.so'

You need to add "kpse.set_program_name" before the "require" call to
initialize the kpathsea Lua module searchers:

diff --git a/texmf-dist/scripts/expltools/explcheck.lua b/texmf-dist/scripts/expltools/explcheck.lua
index f2b1cfa..dbc41c6 100755
--- a/texmf-dist/scripts/expltools/explcheck.lua
+++ b/texmf-dist/scripts/expltools/explcheck.lua
@@ -1,3 +1,4 @@
 #!/usr/bin/env texlua
 -- A command-line interface for the static analyzer explcheck.
+kpse.set_program_name("texlua", "explcheck")
 require("explcheck-cli")

Thanks,
-- Max



More information about the tex-live mailing list.