[latex3-commits] [git/LaTeX3-latex3-l3build] main: Place errorlevel test in correct place (6d643d0)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Feb 24 14:10:34 CET 2022


Repository : https://github.com/latex3/l3build
On branch  : main
Link       : https://github.com/latex3/l3build/commit/6d643d023017f82270789dd64c177f026117ab05

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

commit 6d643d023017f82270789dd64c177f026117ab05
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Thu Feb 24 13:10:34 2022 +0000

    Place errorlevel test in correct place


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

6d643d023017f82270789dd64c177f026117ab05
 l3build-file-functions.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/l3build-file-functions.lua b/l3build-file-functions.lua
index 9f6b908..ca39333 100644
--- a/l3build-file-functions.lua
+++ b/l3build-file-functions.lua
@@ -247,8 +247,8 @@ function cp(glob, source, dest)
       -- Ensure we get similar behavior on all platforms
       if not direxists(dirname(dest)) then
         errorlevel = mkdir(dirname(dest))
+        if errorlevel ~=0 then return errorlevel end
       end
-      if errorlevel ~=0 then return errorlevel end
       errorlevel = execute(
         "cp -RLf '" .. p.cwd .. "' '" .. dest .. "'"
       ) and 0 or 1





More information about the latex3-commits mailing list.