Closed muzimuzhi closed 6 months ago
Oh, os.execute()
from texlua
still returns a single, numeric result.
I found a related mailing list thread https://tug.org/pipermail/luatex/2015-November/005536.html .
Update: From the latest reimplementation of os.execute
in LuaTeX source (in order to take shell-escape state into account), yes os.execute
provided by LuaTeX still returns a single result.
This PR makes sure
l3build
gets an numeric error-level fromos.execute()
.Background
Till Lua 5.1.x,
os.execute()
returns only one result which represents status code.Starting from Lua 5.2,
os.execute()
returns 3 results, among which the first result is eithertrue
ornil
, thus it can no longer be used as numericerrorlevel
in l3build.See Lua 5.2 Reference Manual, 8.2 – Changes in the Libraries
Full doc of
os.execute()
in Lua 5.3, the Lua version that latest LuaTeX (hencetexlua
) uses.