diff options
author | Norbert Preining <norbert@preining.info> | 2020-02-22 03:01:30 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-02-22 03:01:30 +0000 |
commit | 3549e67b13c8460a73d122fbc2eef8badd816636 (patch) | |
tree | 9a4470b701a252b954f3e41771010f24350a033c /macros/latex/contrib/l3build/l3build-unpack.lua | |
parent | edf9632b63615c375b45941052fe190d1e02d887 (diff) |
CTAN sync 202002220301
Diffstat (limited to 'macros/latex/contrib/l3build/l3build-unpack.lua')
-rw-r--r-- | macros/latex/contrib/l3build/l3build-unpack.lua | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/macros/latex/contrib/l3build/l3build-unpack.lua b/macros/latex/contrib/l3build/l3build-unpack.lua index 47aaca7ca7..412b5e84da 100644 --- a/macros/latex/contrib/l3build/l3build-unpack.lua +++ b/macros/latex/contrib/l3build/l3build-unpack.lua @@ -73,28 +73,22 @@ bundleunpack = bundleunpack or function(sourcedirs, sources) end for _,i in ipairs(unpackfiles) do for j,_ in pairs(tree(unpackdir, i)) do - -- This 'yes' business is needed to pass a series of "y\n" to - -- TeX if \askforoverwrite is true - -- That is all done using a file as it's the only way on Windows and - -- on Unix the "yes" command can't be used inside execute (it never - -- stops, which confuses Lua) - execute(os_yes .. ">>" .. localdir .. "/yes") local path, name = splitpath(j) local localdir = abspath(localdir) - errorlevel = run( - unpackdir .. "/" .. path, + local success = io.popen( + "cd " .. unpackdir .. "/" .. path .. os_concat .. os_setenv .. " TEXINPUTS=." .. os_pathsep .. localdir .. (unpacksearch and os_pathsep or "") .. os_concat .. os_setenv .. " LUAINPUTS=." .. os_pathsep .. localdir .. (unpacksearch and os_pathsep or "") .. os_concat .. - unpackexe .. " " .. unpackopts .. " " .. name .. " < " - .. localdir .. "/yes" - .. (options["quiet"] and (" > " .. os_null) or "") - ) - if errorlevel ~=0 then - return errorlevel + unpackexe .. " " .. unpackopts .. " " .. name + .. (options["quiet"] and (" > " .. os_null) or ""), + "w" + ):write(string.rep("y\n", 300)):close() + if not success then + return 1 end end end |