From 1cc6c316feae649d3c8b64ef0c980dfd792c2347 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 24 Dec 2021 19:46:30 +0100 Subject: 2021-12-24 19:09:00 --- scripts/context/lua/mtxrun.lua | 4 ++++ scripts/context/stubs/mswin/mtxrun.lua | 4 ++++ scripts/context/stubs/unix/mtxrun | 4 ++++ scripts/context/stubs/win64/mtxrun.lua | 4 ++++ 4 files changed, 16 insertions(+) (limited to 'scripts') 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 diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index 1a1bc2734..12645e462 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/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 diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index 1a1bc2734..12645e462 100644 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -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 diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua index 1a1bc2734..12645e462 100644 --- a/scripts/context/stubs/win64/mtxrun.lua +++ b/scripts/context/stubs/win64/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 -- cgit v1.2.3