Skip to content

Commit 791bc45

Browse files
committed
Look up CARGO_BAZEL_GENERATOR_PATH correctly
The intent is to allow this variable to be passed in an --action_env, but ctx.var is not where these show up: ctx.configuration.default_shell_env is.
1 parent 130bcac commit 791bc45

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Francois-Rene Rideau <[email protected]>
1616
Julio Merino <[email protected]>
1717
Kamal Marhubi <[email protected]>
1818
Kristina Chodorow <[email protected]>
19+
Michael Hackner <[email protected]>
1920
Philipp Wollermann <[email protected]>
2021
Ulf Adams <[email protected]>
2122
Justine Alexandra Roberts Tunney <[email protected]>

crate_universe/private/crates_vendor.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ def _crates_vendor_impl(ctx):
213213
cargo_bazel_runfiles = []
214214

215215
# Allow action envs to override the use of the cargo-bazel target.
216-
if CARGO_BAZEL_GENERATOR_PATH in ctx.var:
217-
bin_path = ctx.var[CARGO_BAZEL_GENERATOR_PATH]
216+
if CARGO_BAZEL_GENERATOR_PATH in ctx.configuration.default_shell_env:
217+
bin_path = ctx.configuration.default_shell_env[CARGO_BAZEL_GENERATOR_PATH]
218218
elif ctx.executable.cargo_bazel:
219219
bin_path = _runfiles_path(ctx.executable.cargo_bazel, is_windows)
220220
cargo_bazel_runfiles.append(ctx.executable.cargo_bazel)

0 commit comments

Comments
 (0)