Skip to content

Commit f900806

Browse files
cmaloneyclaude
andcommitted
Treat an empty GITHUB_STEP_SUMMARY as disabled
Lets a workflow or test turn off the GitHub reporter by setting the variable to an empty string instead of failing to open ''. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent a83cbaf commit f900806

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Lib/test/libregrtest/reporter.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class GitHubActionsReporter(Reporter):
6161

6262
@staticmethod
6363
def enabled() -> bool:
64-
return "GITHUB_STEP_SUMMARY" in os.environ
64+
return bool(os.environ.get("GITHUB_STEP_SUMMARY"))
6565

6666
def run_started(self, runtests: RunTests) -> None:
6767
self.runtests = runtests

0 commit comments

Comments
 (0)