]> git.proxmox.com Git - cargo.git/commit
Auto merge of #7718 - ehuss:fix-vendor-alt-reg, r=alexcrichton
authorbors <bors@rust-lang.org>
Thu, 19 Dec 2019 09:59:33 +0000 (09:59 +0000)
committerbors <bors@rust-lang.org>
Thu, 19 Dec 2019 09:59:33 +0000 (09:59 +0000)
commit4647b1d142a81de3bbd6be36105fa959a9c01f8f
tree2633c466ad77c4558a2f24e25542478022f2002b
parent72924379fe213fe4938958c5a50d69c762f39024
parent723748fabfe30e79bc7012d58dfd9fdc3349e7b1
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.