Description
In PR #144, cmd.Output()
was changed to cmd.CombinedOutput()
which captures stderr along with stdout.
However, not every use case benefits from capturing stderr and send out in http body. Stderr is usually being used as the destination for debugging logs/messages. Unexpected output from stderr may disturb stdout and does not match the expected Content-Type of http response body. Many script language may output traceback and relevant source code lines when an exception occurred, and it may not be very obvious how to avoid the leak.
I would like to see an option controlling whether stderr will be captured along with stdout. When not captured, only stdout from hook executables will be sent as http body, and stderr just inherit from webhook (or captured by webhook and output with structured logging, maybe another option).
Activity