Skip to content

Commit

Permalink
Fix error when running "tox -p"
Browse files Browse the repository at this point in the history
  • Loading branch information
ymyzk committed Mar 7, 2023
1 parent 44538f1 commit e8f22b6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/tox_gh_actions/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,15 @@ def is_log_grouping_enabled(options: Parsed) -> bool:

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

return True

Expand Down

0 comments on commit e8f22b6

Please sign in to comment.