Skip to content

Commit

Permalink
When running in GitHub Actions, force colors on
Browse files Browse the repository at this point in the history
  • Loading branch information
AndydeCleyre committed Sep 22, 2022
1 parent ce9464d commit 2f15c92
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ward/_terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@
"usedby": "#9285F6",
}
)
rich_console = Console(theme=theme, highlighter=NullHighlighter())
in_ci_supporting_color = os.environ.get("GITHUB_ACTIONS") == "true"
rich_console = Console(
theme=theme, highlighter=NullHighlighter(), force_terminal=in_ci_supporting_color
)


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

0 comments on commit 2f15c92

Please sign in to comment.