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

Joseph Wright joseph.wright at morningstar2.co.uk
Fri Feb 21 08:47:48 CET 2020


Repository : https://github.com/latex3/l3build
On branch  : popen_yes
Link       : https://github.com/latex3/l3build/commit/409272bf9c1dda061587112bbdc1e6cd1f27ca6d

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

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

    io.popen returns a bool


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

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

diff --git a/l3build-unpack.lua b/l3build-unpack.lua
index 0c5e5b1..00c8284 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.