Open spoorn opened 2 years ago
No there isn't, it's probably a good idea to add one.
To remove a binary, you also need to edit ~/.cargo/.crates.toml
and ~/.cargo/binstall/crates-v1.json
to remove the crate.
This one might be related to #176 . @passcod Any idea how can we approach this?
IMO we might need to introduce another cargo
subcommand for it like in #176, introducing a new flag --uninstall
would just be confusing.
I agree. cargo buninstall
?
I agree. cargo buninstall?
Can't think of a better name, so this one LGTM.
cargo buninstall?
😂
y'all think the overhead of managing multiple binaries is worth it over cargo binstall --remove
(and something like cargo binstall --from-manifest
) ? i quite like being able to wget
one tool and just have things work
y'all think the overhead of managing multiple binaries is worth it over cargo binstall --remove (and something like cargo binstall --from-manifest) ?
I also don't like maintaining multiple binaries and create a multi-use binary, but I'm just not sure whether --remove
is a good idea since it could be a bit confusing.
Something we could do is transition to a subcommand pattern, but with a twist: reserve a few names, completely coincidentally on purpose the same as the crate names that are already perma-reserved due to ambiguity, like install
, uninstall
, reinstall
, update
, tools
, and if we see that name as the first "crate" argument, we treat it as a subcommand, otherwise we default to the install
subcommand.
(Also if we see any of these perma-reserved names in the list, regardless of position, we should just error or warn/ignore.)
That would let us have subcommands and transition the canonical usage to:
cargo binstall install tool1 tool2
cargo binstall uninstall tool3
cargo binstall tools
while also transparently supporting the current syntax of
cargo binstall tool4
as an alias to
cargo binstall install tool4
Hi, I actually have a different suggestion than having a whole new uninstall
command added to cargo-binstall
. Why not have cargo uninstall
do the work for us?
For example, with cargo-edit
, cargo-binstall
currently inserts the following entry:
v1 = {
"cargo-edit 0.11.8 (registry+https://github.com/rust-lang/crates.io-index)" = [
"cargo-add", "cargo-rm", "cargo-set-version", "cargo-upgrade"
]
}
If we edit the entry to include the symlink targets:
v1 = {
"cargo-edit 0.11.8 (registry+https://github.com/rust-lang/crates.io-index)" = [
"cargo-add", "cargo-add-v0.11.8",
"cargo-rm", "cargo-rm-v0.11.8",
"cargo-set-version", "cargo-set-version-v0.11.8",
"cargo-upgrade", "cargo-upgrade-v0.11.8"
]
}
Then Cargo will trust that these are all part of cargo-edit
, and delete them upon cargo uninstall cargo-edit
:
C:\>cargo uninstall cargo-edit
Removing C:\Users\me\.cargo\bin\cargo-add-v0.11.8.exe
Removing C:\Users\me\.cargo\bin\cargo-add.exe
Removing C:\Users\me\.cargo\bin\cargo-rm-v0.11.8.exe
Removing C:\Users\me\.cargo\bin\cargo-rm.exe
Removing C:\Users\me\.cargo\bin\cargo-set-version-v0.11.8.exe
Removing C:\Users\me\.cargo\bin\cargo-set-version.exe
Removing C:\Users\me\.cargo\bin\cargo-upgrade-v0.11.8.exe
Removing C:\Users\me\.cargo\bin\cargo-upgrade.exe
To be clear, we could still have an uninstall
subcommand of cargo-binstall
-- but I don't currently see any reason for it to do much more than alias to cargo uninstall
.
@spoorn cargo-binstall now defaults to --no-symlink, and supports uninstalling via cargo-uninstall
@LikeLakers2 That's a good idea, I would do that when I have time since supporting --symlink isn't my priority now and I would accept PRs for this.
On systems without a proper Cargo install (containers and such), we can't rely on cargo-uninstall
. I would still like to request a separate cargo-buninstall
, or an option on cargo-binstall
itself :pray:
On systems without a proper Cargo install (containers and such), we can't rely on
cargo-uninstall
. I would still like to request a separatecargo-bnuninstall
, or an option oncargo-binstall
itself 🙏
Thanks, we can definitely add this (probably via multi-call).
Is there an uninstall command now implemented? I didn't see anything on the --help
Using cargo uninstall
from cargo
would work, our installation is compatible with cargo
Is there an uninstall command to uninstall binaries installed with cargo-binstall?
I tried deleting the symlink and binary from
~/.cargo/bin
, butcargo-binstall
says the package is still installed, yet I can no longer use itEdit: I was able to fix this manually by deleting
~/.cargo/binstall
, but there should be a better way