[latex3-commits] [git/LaTeX3-latex3-l3build] popen_yes: io.popen returns a bool (80cfe35)

Joseph Wright joseph.wright at morningstar2.co.uk
Fri Feb 21 09:09:37 CET 2020


Repository : https://github.com/latex3/l3build
On branch  : popen_yes
Link       : https://github.com/latex3/l3build/commit/80cfe35f7c0dafcea90b466dacc449f388df3213

>---------------------------------------------------------------

commit 80cfe35f7c0dafcea90b466dacc449f388df3213
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Feb 21 07:47:48 2020 +0000

    io.popen returns a bool


>---------------------------------------------------------------

80cfe35f7c0dafcea90b466dacc449f388df3213
 l3build-unpack.lua | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/l3build-unpack.lua b/l3build-unpack.lua
index 5eed747..412b5e8 100644
--- a/l3build-unpack.lua
+++ b/l3build-unpack.lua
@@ -75,7 +75,7 @@ bundleunpack = bundleunpack or function(sourcedirs, sources)
     for j,_ in pairs(tree(unpackdir, i)) do
       local path, name = splitpath(j)
       local localdir = abspath(localdir)
-      errorlevel = io.popen(
+      local success = io.popen(
         "cd " .. unpackdir .. "/" .. path .. os_concat ..
         os_setenv .. " TEXINPUTS=." .. os_pathsep
           .. localdir .. (unpacksearch and os_pathsep or "") ..
@@ -87,8 +87,8 @@ bundleunpack = bundleunpack or function(sourcedirs, sources)
           .. (options["quiet"] and (" > " .. os_null) or ""),
         "w"
       ):write(string.rep("y\n", 300)):close()
-      if errorlevel ~=0 then
-        return errorlevel
+      if not success then
+        return 1
       end
     end
   end





More information about the latex3-commits mailing list.