Closed uliska closed 4 years ago
Basically what would be necessary is
local git
if p then
git = p:read('*a')
git = git:match("(.-)\n")
if p then p:close() end
end
But I have no idea how to produce that newline character in the match expression so it works in directlua
as well. All attempts resulted either in the match resulting in nil
or in some failure preventing the thing to execute at all.
The latest version of
luaotfload
changed handling of "missing characters", (as per https://github.com/u-fischer/luaotfload/blob/2943dbd326481a2359b18a5be958dcd852b0f064/NEWS#L5 and https://github.com/u-fischer/luaotfload/issues/65). When compiled with an up-to-date TeX Live thelyluatex
manual now also shows this behaviour:Investigation revealed that the issue is a traling
\n
character returned byio.popen('git log -n1 --date=short --format='..PC..'"ad"', 'r')
, but I have no clue how to trim that within the\directlua
context. All attempts that work in plain Lua or in a separate Lua file simply don't do so in the actual context.