Skip to content

Commit 21c7bc1

Browse files
authored
Merge pull request #145 from ymyzk/fix-tox-4-parallel
Fix error when running "tox -p"
2 parents 44538f1 + e8f22b6 commit 21c7bc1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/tox_gh_actions/plugin.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,15 @@ def is_log_grouping_enabled(options: Parsed) -> bool:
202202

203203
# The parallel option is not always defined (e.g., `tox run`) so we should check
204204
# its existence first.
205-
# As --parallel-live option doesn't seems to be working correctly,
205+
# As --parallel-live option doesn't seem to be working correctly,
206206
# this condition is more conservative compared to the plugin for tox 3.
207-
if hasattr(options, "parallel") and options.parallel > 0:
208-
return False
207+
if hasattr(options, "parallel"):
208+
if options.parallel > 0:
209+
# Case for `tox p` or `tox -p <num>`
210+
return False
211+
elif options.parallel is None:
212+
# Case for `tox -p`
213+
return False
209214

210215
return True
211216

0 commit comments

Comments
 (0)