summaryrefslogtreecommitdiff
path: root/scripts/context/lua/mtxrun.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/context/lua/mtxrun.lua')
-rw-r--r--scripts/context/lua/mtxrun.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index 1a1bc2734..12645e462 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -27477,6 +27477,10 @@ end
if ok == false then ok = 1 elseif ok == true or ok == nil then ok = 0 end
+if lua and lua.getexitcode then
+ ok = lua.getexitcode()
+end
+
-- os.exit(ok,true) -- true forces a cleanup in 5.2+
os.exit(ok) -- true forces a cleanup in 5.2+ but reports a wrong number then