Skip to content

Pass --respect-source-config to cargo vendor#4001

Open
tamasvajk wants to merge 1 commit intobazelbuild:mainfrom
tamasvajk:vendor-respect-source-config
Open

Pass --respect-source-config to cargo vendor#4001
tamasvajk wants to merge 1 commit intobazelbuild:mainfrom
tamasvajk:vendor-respect-source-config

Conversation

@tamasvajk
Copy link
Copy Markdown
Contributor

Summary

Pass --respect-source-config to cargo vendor.

Problem

Without this flag, cargo vendor ignores [source] replacement configured in .cargo/config.toml. This means any configured registry proxy is silently bypassed, and cargo vendor connects directly to index.crates.io. This breaks vendoring in environments that require a proxy, such as air-gapped networks or behind corporate firewalls.

Fix

Add --respect-source-config to the cargo vendor invocation in VendorGenerator.


Note: This PR was largely AI-generated using Claude Code, with human review and guidance throughout.

Without this flag, `cargo vendor` ignores [source] replacement
configured in .cargo/config.toml, causing it to bypass registry
proxies and connect directly to index.crates.io. This breaks
vendoring in environments that require a proxy (e.g. air-gapped
networks, corporate firewalls).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant