Skip to content

Source Replacement not working #107

Closed
@litzh

Description

$ cargo version
cargo 1.37.0 (9edd08916 2019-08-02)
$ cargo install-update --version
cargo-install-update 1.7.0

According to The Cargo Book, Cargo supports the ability to replace one source with another.

Below is my ~/.cargo/config:

[source.crates-io]
registry = "https://github.com/rust-lang/crates.io-index"
replace-with = 'ustc'
[source.ustc]
registry = "git://mirrors.ustc.edu.cn/crates.io-index"

When executing cargo install, Cargo downloads from custom source.

$ cargo install cargo-update
    Updating `git://mirrors.ustc.edu.cn/crates.io-index` index

When executing cargo install-update, Cargo downloads from the default source.

$ cargo install-update -a
    Updating registry 'https://github.com/rust-lang/crates.io-index'

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions