-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
Description
- I've checked docs and closed issues for possible solutions.
- I can't find my issue in the FAQ.
Describe the bug
Commit 1ebf823 broke the combination of "FORCE_COLOR" and "COLORTERM" taken from the environment variables.
I've created a simple test:
import io
from rich.console import Console
def test_force_color():
console = Console(file=io.StringIO(), _environ={
"FORCE_COLOR": "1",
"COLORTERM": "truecolor",
})
assert console.is_terminal
assert console.color_system == "truecolor"
If master
or 1ebf823 is checked out it fails, because the color_system
is None
. If the commit before (b89d036) is checked out the test succeeds.
I guess that the order of when FORCE_COLOR
and COLORTERM
are interpreted got changed.
Platform
Click to expand
- What platform (Win/Linux/Mac) are you running on? Linux (Manjaro)
- What terminal software are you using? kitty