Skip to content

Commit

Permalink
Only special case args for *_binary and *_test rules (#110)
Browse files Browse the repository at this point in the history
For other rules, Bazel doesn't handle `args` specially and so shouldn't
we.
  • Loading branch information
fmeum authored Jul 30, 2024
1 parent 22edf94 commit 2c93dc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion with_cfg/private/wrapper.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def _wrapper(
extra_attrs["env_inherit"] = kwargs.pop("env_inherit")

frontend_attrs = {}
if "args" in kwargs:
if "args" in kwargs and (rule_info.executable or rule_info.test):
# Leave the args attribute in place on the original rule so that they can be read by the
# args_aspect attached to the exports attribute of the transitioning_alias.
frontend_attrs["args"], frontend_attrs["data"] = rewrite_args(
Expand Down

0 comments on commit 2c93dc2

Please sign in to comment.