-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
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
unhelpful error message trying to uninstall ambiguous crate name #5006
Comments
Hmm, I think the underlying problem is that rustfmt changed the name of its executable which might have confused cargo. EDIT: I can confirm via local testcase:
[package]
name = "cargo_test"
version = "0.1.0"
[dependencies]
[[bin]]
name = "test_1"
path = "src/main.rs" , and then changing version and path [package]
name = "cargo_test"
version = "0.2.0"
[dependencies]
[[bin]]
name = "test_2"
path = "src/main.rs" and installing again will leave the old binary in place.
Uninstalling via |
To clarify, this issue is that the help text from A fix to this issue would be removing the |
The ambiguous spec error tells you to use `-p` which wasn't available for this command. Fixes rust-lang#5006
Allow `-p` in `uninstall` to accommodate error messages. The ambiguous spec error tells you to use `-p` which wasn't available for this command. Fixes #5006
I just ran into this bug on macOS Catalina 10.15.7 running the current cargo from homebrew:
This seems strange for a bug that was closed in 2018. I was able to use the workaround mentioned in this thread, but that help text doesn't look fixed to me. |
I have a rustfmt-nightly installed in $CARGO_HOME.
I tried to remove it:
The error message is confusing, according to
cargo help uninstall
,-p
is not even a valid option foruninstall
I tried a couple of things
but none of these worked.
EDIT:
Hmm, I found this in my $CARGO_HOME/.crates.toml
The text was updated successfully, but these errors were encountered: