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

cargo install should tell the available version when already installed #3587

Closed
birkenfeld opened this issue Jan 24, 2017 · 0 comments · Fixed by #3588
Closed

cargo install should tell the available version when already installed #3587

birkenfeld opened this issue Jan 24, 2017 · 0 comments · Fixed by #3588

Comments

@birkenfeld
Copy link
Contributor

Currently, when trying to install an already-installed crate, we get:

$ cargo install rustfmt
    Updating registry `https://github.com/rust-lang/crates.io-index`
error: binary `cargo-fmt` already exists in destination as part of `rustfmt v0.4.1`

This tells me the currently installed version of rustfmt, but not which version it would be replaced with when I specify -f. This would be interesting especially to know if there is an updated version at all.

When the crates cache is not populated with the new version, we get

$ cargo install rustfmt
    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading rustfmt v0.7.1
error: binary `cargo-fmt` already exists in destination as part of `rustfmt v0.4.1`

which is helpful, but accidental.

birkenfeld added a commit to birkenfeld/cargo that referenced this issue Jan 25, 2017
bors added a commit that referenced this issue Jan 25, 2017
Show new version of package on overwrite error

Fixes #3587
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant