diff --git a/src/bin/cargo/commands/uninstall.rs b/src/bin/cargo/commands/uninstall.rs index e58634933834..46654b66897d 100644 --- a/src/bin/cargo/commands/uninstall.rs +++ b/src/bin/cargo/commands/uninstall.rs @@ -14,9 +14,6 @@ pub fn cli() -> Command { } pub fn exec(config: &mut Config, args: &ArgMatches) -> CliResult { - // Ignore local configuration, same as `cargo install` does - config.reload_rooted_at(config.home().clone().into_path_unlocked())?; - let root = args.get_one::("root").map(String::as_str); if args.is_present_with_zero_values("package") { diff --git a/src/doc/man/cargo-uninstall.md b/src/doc/man/cargo-uninstall.md index ad9c2c6d439d..b2ebd097fc3a 100644 --- a/src/doc/man/cargo-uninstall.md +++ b/src/doc/man/cargo-uninstall.md @@ -19,12 +19,6 @@ By default all binaries are removed for a crate but the `--bin` and {{> description-install-root }} -This command operates on system or user level, not on project level. -This means that the local [configuration discovery] is ignored. -Instead, the configuration discovery begins at `$CARGO_HOME/config.toml`. - -[configuration discovery]: ../reference/config.html#hierarchical-structure - ## OPTIONS ### Install Options diff --git a/src/doc/man/generated_txt/cargo-uninstall.txt b/src/doc/man/generated_txt/cargo-uninstall.txt index bb48c04a1cbb..dcf3d55f75a9 100644 --- a/src/doc/man/generated_txt/cargo-uninstall.txt +++ b/src/doc/man/generated_txt/cargo-uninstall.txt @@ -27,12 +27,6 @@ DESCRIPTION o $HOME/.cargo - This command operates on system or user level, not on project level. - This means that the local configuration discovery - - is ignored. Instead, the configuration discovery begins at - $CARGO_HOME/config.toml. - OPTIONS Install Options -p, --package spec… diff --git a/src/doc/src/commands/cargo-uninstall.md b/src/doc/src/commands/cargo-uninstall.md index 4a0441baf98f..2fb7490b9010 100644 --- a/src/doc/src/commands/cargo-uninstall.md +++ b/src/doc/src/commands/cargo-uninstall.md @@ -26,12 +26,6 @@ The installation root is determined, in order of precedence: - `$HOME/.cargo` -This command operates on system or user level, not on project level. -This means that the local [configuration discovery] is ignored. -Instead, the configuration discovery begins at `$CARGO_HOME/config.toml`. - -[configuration discovery]: ../reference/config.html#hierarchical-structure - ## OPTIONS ### Install Options diff --git a/src/etc/man/cargo-uninstall.1 b/src/etc/man/cargo-uninstall.1 index a8262fe397c3..d3ead1092670 100644 --- a/src/etc/man/cargo-uninstall.1 +++ b/src/etc/man/cargo-uninstall.1 @@ -36,10 +36,6 @@ The installation root is determined, in order of precedence: .RS 4 \h'-04'\(bu\h'+02'\fB$HOME/.cargo\fR .RE -.sp -This command operates on system or user level, not on project level. -This means that the local \fIconfiguration discovery\fR is ignored. -Instead, the configuration discovery begins at \fB$CARGO_HOME/config.toml\fR\&. .SH "OPTIONS" .SS "Install Options" .sp diff --git a/tests/testsuite/install.rs b/tests/testsuite/install.rs index ddd11b743337..7d93bd3ae51e 100644 --- a/tests/testsuite/install.rs +++ b/tests/testsuite/install.rs @@ -1834,37 +1834,6 @@ fn install_path_config() { .run(); } -#[cargo_test] -fn uninstall_should_ignore_local_config() { - let project = project() - .file( - ".cargo/config", - r#" - [install] - root = './' - "#, - ) - .file("src/main.rs", "fn main() {}") - .build(); - - // Will install `foo` binary to `/path/to/foo/bin/foo` - cargo_process("install --path foo").run(); - - assert_has_installed_exe(project.root(), "foo"); - - // Won't find the `foo` executable, because `cargo uninstall` - // ignores the config resolution chain of the current work directory - cargo_process("uninstall foo") - .cwd("foo") - .with_status(101) - .with_stderr_contains( - "[..]error: package ID specification `foo` did not match any packages[..]", - ) - .run(); - - cargo_process("uninstall foo --root foo").run(); -} - #[cargo_test] fn install_version_req() { // Try using a few versionreq styles.