[luatex] Bug in io.popen
deepak.jois at gmail.com
Fri Oct 21 16:40:59 CEST 2016
See below for a minimal example of how io.popen behavior seems to be
different in LuaTeX, which leads to an error. It seems that the 'read'
method is not present on whatever is returned from io.popen.
I ran across this issue when trying to use LuaRocks within LuaTeX.
LuaRocks runs something like:
local version = io.popen("sw_vers -productVersion"):read("*l")
which errors out.
This happens even when I disable kpse and set texconfig.shell_escape to 't'.
Is this a bug?
Regular Lua interpreter:
Lua 5.2.4 Copyright (C) 1994-2015 Lua.org, PUC-Rio
$ cat popen.tex
$ luatex popen.tex
This is LuaTeX, Version 0.95.0 (TeX Live 2016)
restricted system commands enabled.
(./popen.tex[\directlua]:1: attempt to index a nil value
[\directlua]:1: in main chunk.
! Emergency stop.
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on popen.log.
More information about the luatex