Skip to content

Commit 2f15c92

Browse files
committed
When running in GitHub Actions, force colors on
Fixes darrenburns#243
1 parent ce9464d commit 2f15c92

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ward/_terminal.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@
9393
"usedby": "#9285F6",
9494
}
9595
)
96-
rich_console = Console(theme=theme, highlighter=NullHighlighter())
96+
in_ci_supporting_color = os.environ.get("GITHUB_ACTIONS") == "true"
97+
rich_console = Console(
98+
theme=theme, highlighter=NullHighlighter(), force_terminal=in_ci_supporting_color
99+
)
97100

98101

99102
def format_test_id(test_result: TestResult) -> str:

0 commit comments

Comments
 (0)