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

[Feature Request] Force If Newer #6163

Closed
TheDan64 opened this issue Oct 11, 2018 · 6 comments
Closed

[Feature Request] Force If Newer #6163

TheDan64 opened this issue Oct 11, 2018 · 6 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-install

Comments

@TheDan64
Copy link

TheDan64 commented Oct 11, 2018

In my project's CI, I cache a rust binary CLI tool so that it doesn't have to be reinstalled every time. However, when newer versions of the binary are released, it'd be nice to force an update.

So for example, it'd be great to have a cargo install X --force-if-newer flag which acts like the --force flag but is conditional on a never version of the binary being available. That way it doesn't reinstall blindly every time but only as necessary.

Edit: Oops, didn't open an internals thread first.

@alexcrichton alexcrichton added Command-install C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` labels Oct 11, 2018
@k-nasa
Copy link
Contributor

k-nasa commented Jan 23, 2019

I'll take this task, is it ok❓

@dwijnand
Copy link
Member

Shouldn't this be the behaviour under --ensure, too? I.e in your #6592 PR?

@k-nasa
Copy link
Contributor

k-nasa commented Jan 23, 2019

Oops. You're right.

@ehuss
Copy link
Contributor

ehuss commented Dec 9, 2019

I believe this is now stabilized via #7560.

@ehuss ehuss closed this as completed Dec 9, 2019
@TheDan64
Copy link
Author

TheDan64 commented Dec 9, 2019

@ehuss Do I understand your change correctly - cargo install will now overwrite the binary by default, if it finds a new version?

@ehuss
Copy link
Contributor

ehuss commented Dec 9, 2019

Yes, starting with 1.41 which is currently the nightly channel.

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` Command-install
Projects
None yet
Development

No branches or pull requests

5 participants