[latex3-commits] [git/LaTeX3-latex3-l3build] main: Propagate error codes from checkinit() (7b282d4)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu May 13 14:58:44 CEST 2021


Repository : https://github.com/latex3/l3build
On branch  : main
Link       : https://github.com/latex3/l3build/commit/7b282d42fe3f222ec44ed0230941a3ea6813f1a2

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

commit 7b282d42fe3f222ec44ed0230941a3ea6813f1a2
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Thu May 13 11:24:46 2021 +0200

    Propagate error codes from checkinit()
    
    Fixes #189.


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

7b282d42fe3f222ec44ed0230941a3ea6813f1a2
 l3build-check.lua | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/l3build-check.lua b/l3build-check.lua
index 47ab19c..2ed08cb 100644
--- a/l3build-check.lua
+++ b/l3build-check.lua
@@ -849,7 +849,10 @@ function check(names)
   local errorlevel = 0
   if testfiledir ~= "" and direxists(testfiledir) then
     if not options["rerun"] then
-      checkinit()
+      errorlevel = checkinit()
+      if errorlevel ~= 0 then
+        return errorlevel
+      end
     end
     local hide = true
     if names and next(names) then
@@ -994,7 +997,12 @@ function showfaileddiff()
 end
 
 function save(names)
-  checkinit()
+  do
+    local errorlevel = checkinit()
+    if errorlevel ~= 0 then
+      return errorlevel
+    end
+  end
   local engines = options["engine"] or {stdengine}
   if names == nil then
     print("Arguments are required for the save command")





More information about the latex3-commits mailing list.