cro3
cro3 copied to clipboard
As in #117, use the "script" command to force strange stdout to behave and handle terminal/non terminal cases
As in PR #117 , we use the script
command to force sub processes to behave and print out.
Right now in that case we simply forward stdout to stdout and ignore our tracing logging system (which in the future may cause issues when trying to see the logs of subprocesses).
I propose reintroducing the changes removed in #111 and handle these cases in two ways:
- If we are running in a terminal do as PR #117 did and forward directly, providing a good terminal experience
- if we are running outside of a TTY, transform \r characters into \n characters and log to a file and tracing
This way the logs contain teh lgos of subproceses, and create files that can be uploaded directly to some system if it becomes dependent on lium