nabijaczleweli / cargo-update

A cargo subcommand for checking and applying updates to installed executables
MIT License
1.22k stars 42 forks source link

Failure when using source replacement #247

Closed cyqsimon closed 10 months ago

cyqsimon commented 10 months ago

When a source replacement is specified for crates.io in ~/.cargo/config.toml, updating using cargo install-update -a will fail:

Updating PKG
error: registry index was not found in any configuration: `SOURCE`

Steps to reproduce

  1. Append the following to ~/.cargo/config.toml:
[source.my-replacement-source]
registry = "https://github.com/jhnc-oss/crates.io-index.git"
[source.crates-io]
replace-with = "my-replacement-source"

You can use any valid registry; I just picked the most recent GitHub fork of https://github.com/rust-lang/crates.io-index.

  1. Run cargo install fd-find@8.6.0 to verify the registry setting. Again, you can use any valid binary crate.
  2. Run cargo install-update -l to verify that fd-find has an update.
  3. Run cargo install-update -a and observe the failure.
  4. Don't forget to reset ~/.cargo/config.toml after testing.
nabijaczleweli commented 10 months ago

Dupe of #185, documented in https://github.com/nabijaczleweli/cargo-update#source-replacement-vs-custom-registries – you need an index key with the same value as registry, this was broken by cargo 2019-09-10.

nabijaczleweli commented 10 months ago

closing? nope, didn't work. github just doesn't work at all anymore

cyqsimon commented 10 months ago

Ah okay sorry my bad. Didn't read properly.