-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
I found that in 2017 "--host" has been replaced by "--index". #4209
Is it necessary to keep this command or prompt message now?
cargo/tests/testsuite/search.rs
Lines 184 to 236 in 7f08ace
// TODO: Deprecated | |
// remove once it has been decided '--host' can be safely removed | |
#[cargo_test] | |
fn simple_with_host() { | |
setup(); | |
cargo_process("search postgres --host") | |
.arg(registry_url().to_string()) | |
.with_stderr( | |
"\ | |
[WARNING] The flag '--host' is no longer valid. | |
Previous versions of Cargo accepted this flag, but it is being | |
deprecated. The flag is being renamed to 'index', as the flag | |
wants the location of the index. Please use '--index' instead. | |
This will soon become a hard error, so it's either recommended | |
to update to a fixed version or contact the upstream maintainer | |
about this warning. | |
[UPDATING] `[CWD]/registry` index | |
", | |
) | |
.with_stdout_contains(SEARCH_RESULTS) | |
.run(); | |
} | |
// TODO: Deprecated | |
// remove once it has been decided '--host' can be safely removed | |
#[cargo_test] | |
fn simple_with_index_and_host() { | |
setup(); | |
cargo_process("search postgres --index") | |
.arg(registry_url().to_string()) | |
.arg("--host") | |
.arg(registry_url().to_string()) | |
.with_stderr( | |
"\ | |
[WARNING] The flag '--host' is no longer valid. | |
Previous versions of Cargo accepted this flag, but it is being | |
deprecated. The flag is being renamed to 'index', as the flag | |
wants the location of the index. Please use '--index' instead. | |
This will soon become a hard error, so it's either recommended | |
to update to a fixed version or contact the upstream maintainer | |
about this warning. | |
[UPDATING] `[CWD]/registry` index | |
", | |
) | |
.with_stdout_contains(SEARCH_RESULTS) | |
.run(); | |
} |
and
https://github.com/rust-lang/cargo/blob/7f08ace4f1/src/cargo/util/command_prelude.rs#L633
Metadata
Metadata
Assignees
Labels
No labels