Skip to content

Commit 4327ce4

Browse files
authored
Pass CARGO_REGISTR* env vars through to vendor (#3520)
These are used for authenticating to registries, which may be required when vendoring.
1 parent 7d96cde commit 4327ce4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

crate_universe/private/crates_vendor.bzl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ if [[ -n "${{CARGO_BAZEL_DEBUG:-}}" ]]; then
3939
_ENVIRON+=(CARGO_BAZEL_DEBUG="${{CARGO_BAZEL_DEBUG}}")
4040
fi
4141
42+
# Pass on CARGO_REGISTRIES_* and CARGO_REGISTRY*
43+
while IFS= read -r line; do _ENVIRON+=("${{line}}"); done < <(env | grep ^CARGO_REGISTR)
44+
4245
# The path needs to be preserved to prevent bazel from starting with different
4346
# startup options (requiring a restart of bazel).
4447
# If you provide an empty path, bazel starts itself with

0 commit comments

Comments
 (0)