-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG!] Python script with Status adding new line to stdout with echo #1662
Labels
Comments
I think I know the cause. You might want to revert to 10.12.0 in the meantime. |
Nice @willmcgugan! thanks for the suggestion. What would be the problem? We were very curious in my team yesterday 😛 |
I think this PR #1648 had some unintended consequences. |
Merged
Did I solve your problem? Consider sponsoring the ongoing work on Rich and Textual. Or buy me a coffee to say thanks. |
netbsd-srcmastr
pushed a commit
to NetBSD/pkgsrc
that referenced
this issue
Nov 23, 2021
10.14.0 Fixed Fixed progress speed not updating when total doesn't change Fixed superfluous new line in Status Textualize/rich#1662 Fixed Windows legacy width again Fixed infinite loop in set_cell_size Textualize/rich#1682 Added Added file protocol to URL highlighter Textualize/rich#1681 Added rich.protocol.rich_cast Changed Allowed __rich__ to work recursively Allowed Text classes to work with sep in print Textualize/rich#1689
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
In my company CI pipeline with GitHub Actions, recently a weird behavior started to appear when I ran a script that outputed a new environment variable with
print
:This week or so, we've discovered it started to break all of our workflow jobs (GHA) with:
Which usually happens when some unsupported character goes into the GITHUB_ENV file.
Going deep into the problem I found out that there was a newline being outputed to $GITHUB_ENV, although there was no print statement other than only one in the
buggy_deployment_manager
module, and no logging or etc was being held in the stdout buffer explicitly.With pdb and flushing all print outputs, I've discovered that the context manager Status from rich actually (somehow and to somewhere) inside this
buggy_deployment_manager
prints out a newline toecho
once it ends. This \n only appeared withecho
, which is a weird behavior, I don't think it was supposed to happen or why it happened.To Reproduce
Create a script named
bug.py
with:And run with:
Instead of:
It will write:
Platform
I've used locally on MacOS 12.0.1, Ubuntu 20.04 and within our CI runner ( Debian 11 ) with:
The text was updated successfully, but these errors were encountered: