]>
git.proxmox.com Git - cargo.git/commit
Auto merge of #7718 - ehuss:fix-vendor-alt-reg, r=alexcrichton
vendor: support alt registries
Adds support for alt registries to `cargo vendor`. It mostly worked before, but panicked when trying to display the `.cargo/config` instructions.
This isn't entirely elegant, as the source replacement looks like this:
```toml
[source.crates-io]
replace-with = "vendored-sources"
[source."file:///Users/eric/Proj/rust/cargo/target/cit/t0/alternative-registry"]
registry = "file:///Users/eric/Proj/rust/cargo/target/cit/t0/alternative-registry"
replace-with = "vendored-sources"
[source."file:///Users/eric/Proj/rust/cargo/target/cit/t0/gitdep"]
git = "file:///Users/eric/Proj/rust/cargo/target/cit/t0/gitdep"
branch = "master"
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
```
The duplication of the URLs is a little unfortunate. It could use the name of the registry, but that is not readily available and is tricky to obtain. I feel like that is a challenge for another day.
Closes #7674.