Skip to content
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

Adding an update subcommand to install to update locally installed binaries #10190

Closed
cocool97 opened this issue Dec 10, 2021 · 2 comments
Closed
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@cocool97
Copy link

Problem

It is currently a bit of a mess to update local installed binaries. We have to re-install all of them to get to the point.

The goal of the install subcommand would be only to install new packages (and throw an error if the package is already installed), and the update subcommand could update locally installed packages.

Proposed Solution

It could be a good idea to add an update subcommand to install to allow people to update one, more or all locally installed binaries.

Notes

No response

@cocool97 cocool97 added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Dec 10, 2021
@cocool97 cocool97 changed the title Adding an update subcommand to install to update installed binaries Adding an update subcommand to install to update locally installed binaries Dec 10, 2021
@Eh2406
Copy link
Contributor

Eh2406 commented Dec 10, 2021

If the package is already installed, Cargo will reinstall it if the installed version does not appear to be up-to-date. If any of the following values change, then Cargo will reinstall the package:

https://doc.rust-lang.org/cargo/commands/cargo-install.html

Also cargo update is an existing command that is entirely unrelated.

@ehuss
Copy link
Contributor

ehuss commented Dec 13, 2021

Yea, cargo install already updates packages if they are out of date. Updating all out-of-date packages is tracked in other issues like #9527, so closing as a duplicate of that.

@ehuss ehuss closed this as completed Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

No branches or pull requests

3 participants