Double carriage returns in Gitlab CI Windows job logs swallow previous line
Summary
In contrast to CMD and git bash, Gitlab CI's log output swallows the current line when encountering Some text\r\r\n from Windows jobs.
This makes Python tools like invoke lose their output on Windows, because they capture output (including \r\n on Windows) and print it as-is. Python's newline handling converts the \n to \r\n on Windows, leading to \r\r\n being printed in the end.
Steps to reproduce
Make the Windows CI run a Python script with print("Some text\r\n") in it: The script output is visible in local CMD and Git bash, but not in Gitlab CI's job logs. See example project for invoke example.
Example Project
https://gitlab.com/rschweizer/test-carriage-return
What is the current bug behavior?
Windows output is rendered in the same way as Linux output, swallowing the preceding text on \r\r\n sequences.
What is the expected correct behavior?
CMD and git bash render the line before \r\r\n characters on Windows. I'm not absolutely sure if this is correct. But it would make invoke work.
Relevant logs and/or screenshots
On Linux:
On Windows, the line disappears:
Output of checks
This bug happens on GitLab.com

