fix: fix differing stacktrace on stdout and file (#1404)

* fix(c-bootstrap): produce identical stack traces
This commit is contained in:
Takase 2023-04-08 01:18:16 +08:00 committed by GitHub
parent 34ba4dbee6
commit 6313b3d274
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -239,7 +239,7 @@ init_lua:
"end, function(err)\n" "end, function(err)\n"
" local error_dir\n" " local error_dir\n"
" io.stdout:write('Error: '..tostring(err)..'\\n')\n" " io.stdout:write('Error: '..tostring(err)..'\\n')\n"
" io.stdout:write(debug.traceback(nil, 4)..'\\n')\n" " io.stdout:write(debug.traceback(nil, 2)..'\\n')\n"
" if core and core.on_error then\n" " if core and core.on_error then\n"
" error_dir=USERDIR\n" " error_dir=USERDIR\n"
" pcall(core.on_error, err)\n" " pcall(core.on_error, err)\n"