Skip to content

Commit

Permalink
Guard against confusion of passing -b when it won't be used.
Browse files Browse the repository at this point in the history
  • Loading branch information
TallJimbo committed Sep 13, 2023
1 parent 27d11c9 commit 01b3285
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/lsst/ctrl/mpexec/cli/cmd/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ def build(ctx: click.Context, **kwargs: Any) -> None:
"""
kwargs = _collectActions(ctx, **kwargs)
show = ShowInfo(kwargs.pop("show", []))
if kwargs.get("butler_config") is not None and {"pipeline-graph", "task-graph"}.isdisjoint(show.commands):
raise click.ClickException(
"--butler-config was provided but nothing uses it "
"(only --show pipeline-graph and --show task-graph do)."
)
script.build(**kwargs, show=show)
_unhandledShow(show, "build")

Expand Down

0 comments on commit 01b3285

Please sign in to comment.