Skip to content

Commit

Permalink
Forward RunEnvironmentInfo if present (#1008)
Browse files Browse the repository at this point in the history
  • Loading branch information
molar authored Dec 11, 2024
1 parent 1549b1f commit 2ed3686
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/transitions.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions lib/transitions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ def _platform_transition_binary_impl(ctx):
),
)

if RunEnvironmentInfo in binary:
result.append(binary[RunEnvironmentInfo])

return result

def _get_platform_transition_attrs(binary_cfg):
Expand All @@ -112,7 +115,7 @@ platform_transition_binary = rule(
# intuitive output path (matching an untransitioned binary).
attrs = _get_platform_transition_attrs(binary_cfg = _transition_platform),
executable = True,
doc = "Transitions the binary to use the provided platform.",
doc = "Transitions the binary to use the provided platform. Will forward RunEnvironmentInfo",
)

platform_transition_test = rule(
Expand All @@ -123,5 +126,5 @@ platform_transition_test = rule(
# the test action.
cfg = _transition_platform,
test = True,
doc = "Transitions the test to use the provided platform.",
doc = "Transitions the test to use the provided platform. Will forward RunEnvironmentInfo",
)

0 comments on commit 2ed3686

Please sign in to comment.