[latex3-commits] [l3svn] branch master updated: Return ERRORLEVEL = 1 from failure in top-level script

noreply at latex-project.org noreply at latex-project.org
Wed Sep 23 22:13:44 CEST 2015


This is an automated email from the git hooks/post-receive script.

joseph pushed a commit to branch master
in repository l3svn.

The following commit(s) were added to refs/heads/master by this push:
       new  aede682   Return ERRORLEVEL = 1 from failure in top-level script
aede682 is described below

commit aede682ed5929d22ba06304e4adae54a41dd8214
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Sep 23 21:13:15 2015 +0100

    Return ERRORLEVEL = 1 from failure in top-level script
    
    The standard return is 256, which confuses other tools.
---
 build.lua |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/build.lua b/build.lua
index 897be52..1511e16 100644
--- a/build.lua
+++ b/build.lua
@@ -48,32 +48,34 @@ function main (target)
     end
     return errorlevel
   end
+  local errorlevel 
   if target == "check" then
-    os.exit(dobundles(checkbundles, "check"))
+    errorlevel = dobundles(checkbundles, "check")
   elseif target == "clean" then
     print ("Cleaning up")
     dobundles (bundles, "clean")
     rm (".", "*.zip")
   elseif target == "ctan" then
-    local errorlevel = dobundles (ctanbundles, "ctan")
+    errorlevel = dobundles (ctanbundles, "ctan")
     if errorlevel == 0 then
       for _,i in ipairs (ctanbundles) do
         cp (i .. ".zip", i, ".")
       end
-    else
-      os.exit(errorlevel)
     end
   elseif target == "doc" then
-    os.exit(dobundles(bundles, "doc"))
+    errorlevel = dobundles(bundles, "doc")
   elseif target == "install" then
-    os.exit(dobundles (bundles, "install"))
+    errorlevel = dobundles (bundles, "install")
   elseif target == "unpack" then
-    os.exit(dobundles (bundles, "unpack"))
+    errorlevel = dobundles (bundles, "unpack")
   elseif target == "version" then
       version ()
   else
     help ()
   end
+  if errorlevel ~=0 then
+    os.exit(1)
+  end
 end
 
 -- Load the common build code: this is the one place that a path needs to be

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the latex3-commits mailing list