You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem you are trying to solve
I would like to install some cargo utilities via a bootstrap script, and would like it to skip utilities that have already been installed.
$ rbenv install --help
...
-s/--skip-existing Skip if the version appears to be installed already
...
This flag would output a message to stderr indicating the crate is already installed, and return a status code of 0 (instead of the current 101).
Notes
I was working around this with command -v cargo-tree | cargo install cargo-tree, but that approach fails with cargo-edit, because it adds multiple binaries, none of which are called cargo-edit. I also feel this is a simple, partial workaround to the multiple requests for using install to upgrade crates.
The text was updated successfully, but these errors were encountered:
Thanks for the report! I've recently implemented a feature that will automatically skip the install if it is already installed. It hasn't been merged yet (#6798), but could you take a look at the documentation and let me know if it covers your needs?
It would definitely cover my needs in this scenario! I thought I'd propose this as a (hopefully) uncontroversial/uncomplicated way to achieve my goals in the short term, but do you think there's any value in it vs. your PR there? (I'm happy to open a PR for this suggestion).
Describe the problem you are trying to solve
I would like to install some cargo utilities via a bootstrap script, and would like it to skip utilities that have already been installed.
Describe the solution you'd like
Prior art from
rbenv
:$ rbenv install --help ... -s/--skip-existing Skip if the version appears to be installed already ...
This flag would output a message to
stderr
indicating the crate is already installed, and return a status code of0
(instead of the current101
).Notes
I was working around this with
command -v cargo-tree | cargo install cargo-tree
, but that approach fails withcargo-edit
, because it adds multiple binaries, none of which are calledcargo-edit
. I also feel this is a simple, partial workaround to the multiple requests for usinginstall
to upgrade crates.The text was updated successfully, but these errors were encountered: