Commit c83bb94c by Arun Babu Neelicattu

groups: warn when with/without is used with only

This change adds a warning that values of `with`/`without` options are
ignored when used with `only`.
parent ddff9007
...@@ -80,6 +80,14 @@ class GroupCommand(EnvCommand): ...@@ -80,6 +80,14 @@ class GroupCommand(EnvCommand):
) )
groups[new].add(group) groups[new].add(group)
if groups["only"] and (groups["with"] or groups["without"]):
self.line_error(
"<warning>The `<fg=yellow;options=bold>--with</>` and "
"`<fg=yellow;options=bold>--without</>` options are ignored when used"
" along with the `<fg=yellow;options=bold>--only</>` option."
"</warning>"
)
return groups["only"] or self.non_optional_groups.union( return groups["only"] or self.non_optional_groups.union(
groups["with"] groups["with"]
).difference(groups["without"]) ).difference(groups["without"])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment