nabijaczleweli / cargo-update

A cargo subcommand for checking and applying updates to installed executables
MIT License
1.22k stars 42 forks source link

Allow specifying a version of a package to install. #37

Closed tomprince closed 7 years ago

tomprince commented 7 years ago

I'd like to be able to specify a version to install when using cargo install-update -i. I'd like to be able to use this in travis to install a pinned version of packages like rustfmt/clippy without needing to manually check if the package is installed or the correct version.

nabijaczleweli commented 7 years ago

That sounds like a job for cargo install --force --vers XXX YYY, unless I'm missing some obvious advantage basically rewriting the UI and update-check layers would bring?

tomprince commented 7 years ago

I'd like to avoid reinstalling the package if it is already installed and of the correct version. The use-case I have is installing clippy in travis builds. For example, I'd like to replace the code here with something like cargo install-update -i clippy:$CLIPPY_VERSION.

nabijaczleweli commented 7 years ago

ya alright

nabijaczleweli commented 7 years ago

Currently waiting on https://github.com/danielpclark/array_tool/pull/12

nabijaczleweli commented 7 years ago

https://github.com/danielpclark/array_tool/pull/12 landed in array_tool 0.4.0

nabijaczleweli commented 7 years ago

did that do the thing for you or is it still kinda off

tomprince commented 7 years ago

Yes, that appears to work.

nabijaczleweli commented 7 years ago

Released in v1.1.0.