Describe the bug
If you consider Subprocess.check_output(), it will log both stdout and stderr in the event of an error.
However, Subprocess.run() does not attempt to log either stdout or stderr in the event of an error. The most likely reason for this is because stdout and stderr are being written to the console as the subprocess command runs. In the event that stdout and stderr are being piped, though, the content may be lost altogether.
Steps to reproduce
One example is an error during macOS code signing since stderr is being piped for inspection is certain error cases but never written for fatal errors.
Expected behavior
In the event that subprocess.run() is piping an output, ensure that output is captured in the log for an error.
Screenshots
No response
Environment
- Operating System: n/a
- Python version: n/a
- Software versions:
- Briefcase:
0.3.20.dev47+g77cb18ec
Logs
In the log, you can see stderr has content, but it is not being fully captured in the log.
https://github.com/user-attachments/files/16044976/briefcase.2024_06_30-10_13_00.package.log
Additional context
Describe the bug
If you consider
Subprocess.check_output(), it will log bothstdoutandstderrin the event of an error.However,
Subprocess.run()does not attempt to log eitherstdoutorstderrin the event of an error. The most likely reason for this is becausestdoutandstderrare being written to the console as the subprocess command runs. In the event thatstdoutandstderrare being piped, though, the content may be lost altogether.Steps to reproduce
One example is an error during macOS code signing since
stderris being piped for inspection is certain error cases but never written for fatal errors.Expected behavior
In the event that
subprocess.run()is piping an output, ensure that output is captured in the log for an error.Screenshots
No response
Environment
0.3.20.dev47+g77cb18ecLogs
In the log, you can see
stderrhas content, but it is not being fully captured in the log.https://github.com/user-attachments/files/16044976/briefcase.2024_06_30-10_13_00.package.log
Additional context