Yuescript
Yuescript copied to clipboard
Output uncaught errors to stderr rather than stdout
When using the yue CLI as an interpreter, it currently always pushes error tracebacks to /dev/stdout, when they should actually go to /dev/stderr. This will ensure that errors actually get displayed on the console, instead of being treated as regular output (e.g. when used in a shell pipeline).
Note that this is only relevant for uncaught errors that cause the interpreter to crash, not for errors handled with pcall / xpcall.
Thanks for reporting this! Just to confirm, how were you using the yue CLI as an interpreter—was it via REPL mode, or using yue -e with inline code or filename?