diff --git a/golibs/snail/lua.go b/golibs/snail/lua.go index db2ff07..61ca254 100644 --- a/golibs/snail/lua.go +++ b/golibs/snail/lua.go @@ -85,6 +85,9 @@ func srun(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) { if code, ok := interp.IsExitStatus(err); ok { exitCode = int(code) } else { + if exErr, ok := util.IsExecError(err); ok { + exitCode = exErr.Code + } luaErr = rt.StringValue(err.Error()) } }