summaryrefslogtreecommitdiff
path: root/src/wrapper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wrapper.c')
-rw-r--r--src/wrapper.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/wrapper.c b/src/wrapper.c
index 7cb52e3..d4f1412 100644
--- a/src/wrapper.c
+++ b/src/wrapper.c
@@ -68,7 +68,13 @@ main(int argc, char **argv)
parg.retcode = 0;
success = lua_cpcall(L, &protected_main, &parg);
-
+
+ if (success != 0) {
+ size_t l;
+ const char *s = lua_tolstring(L, 1, &l);
+ write(2, s, l);
+ }
+
lua_close(L);
return ((success == 0) && (parg.retcode == 0)) ? EXIT_SUCCESS :