| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
NewlineTransformer split stdout/stderr on os.EOL. On Windows that is \r\n, so output using bare \n line endings was never split into messages: the data was buffered and dropped, because _flush runs after the stream's end handler has already resolved the run()/end() callback. Normal print() worked only because Python's text-mode stdout translates \n to \r\n on Windows. Split on /\r?\n/ so both line endings are handled.
There was a problem hiding this comment.
Reviewed current head 9fe76e4 against #331.
Splitting on /\r?\n/ fixes bare-LF output on Windows while preserving CRLF handling. Because _lastLineData is prepended before splitting, a CRLF pair split across two stream chunks is still reconstructed and emitted as one normal line.
The focused transformer tests cover both LF and CRLF without expanding into the separate bare-CR behavior from #325. LGTM.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #331.
NewlineTransformer split stdout/stderr on os.EOL. On Windows that is \r\n, so output using bare \n line endings was never split into messages: the data was buffered in _lastLineData and dropped, because _flush runs after the stream's end handler has already resolved the run()/end() callback. print() worked only because Python's text-mode stdout translates \n to \r\n on Windows.
Split on /\r?\n/ so both line endings are handled.
Added a regression test against the exported NewlineTransformer (deterministic and OS independent). It fails on the previous code for the bare-\n case and passes with the fix.