Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

If FORCE_COLOR is set, tell rich to force_terminal #347

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ward/_terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@
"usedby": "#9285F6",
}
)
rich_console = Console(theme=theme, highlighter=NullHighlighter())
rich_console = Console(
theme=theme,
highlighter=NullHighlighter(),
force_terminal=True if os.environ.get("FORCE_COLOR") else None,
)


def format_test_id(test_result: TestResult) -> str:
Expand Down