We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cargo install
If a default registry is set via registry.default, then cargo install ignores the --index option and instead uses the default registry.
registry.default
--index
cargo install --index <URL> <CRATE>
For example, the following should fail attempting to resolve my-registry-server, but instead it succeeds installing from crates.io.
my-registry-server
CARGO_REGISTRY_DEFAULT=crates-io cargo install --index https://my-registry-server/ ripgrep
Reorder the chained if such that index has precedence over registry: https://github.com/rust-lang/cargo/blob/master/src/bin/cargo/commands/install.rs#L132
if
index
No response
cargo 1.66.0-nightly (071eeaf21 2022-10-22) release: 1.66.0-nightly commit-hash: 071eeaf210708219a5a1b2c4728ca2f97df7f2ae commit-date: 2022-10-22 host: x86_64-unknown-linux-gnu libgit2: 1.5.0 (sys:0.15.0 vendored) libcurl: 7.83.1-DEV (sys:0.4.55+curl-7.83.1 vendored ssl:OpenSSL/1.1.1q) os: Ubuntu 22.04 (jammy) [64-bit] Also occurs on stable.
The text was updated successfully, but these errors were encountered:
b690ab4
Successfully merging a pull request may close this issue.
Problem
If a default registry is set via
registry.default
, thencargo install
ignores the--index
option and instead uses the default registry.Steps
registry.default
to any registry namecargo install --index <URL> <CRATE>
pointing to a different registry--index
argument and install fromregistry.default
instead.For example, the following should fail attempting to resolve
my-registry-server
, but instead it succeeds installing from crates.io.Possible Solution(s)
Reorder the chained
if
such thatindex
has precedence over registry: https://github.com/rust-lang/cargo/blob/master/src/bin/cargo/commands/install.rs#L132Notes
No response
Version
The text was updated successfully, but these errors were encountered: