Skip to content

[config feature] revert source.<name>.replace-with in a project directory #15618

Open
@Etavioxy

Description

@Etavioxy

Problem

config "source.<name>.replace-with" can't be revert.

I use this in global scope (~/.cargo/config.toml)

[source.crates-io]
replace-with = 'ustc'

[source.ustc]
registry = "sparse+https://mirrors.ustc.edu.cn/crates.io-index/"

I tried to revert this source change in a specific project for using the official 'crates-io' source. So I use this

# ~/project/.cargo/config.toml
[source.crates-io]
replace-with = ""

It goes wrong

Caused by:
could not find a configured source with the name `` when attempting to lookup `crates-io` 

Proposed Solution

No response

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-configurationArea: cargo config files and env varsA-source-replacementArea: [source] replacementC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions