nabijaczleweli / cargo-update

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

Allow custom install command to overwrite default install behavior #151

Closed mainrs closed 3 years ago

mainrs commented 3 years ago

It would be great if there was a way to specify a custom install command instead of cargo-update invoking cargo install in the background. Tools similar to cargo-quickinstall would then be able to integrate with cargo-update. Instead of updating by compiling the binary itself on the local machine, the custom command could use used to invoke cargo-quickinstall, which downloads a pre-built binary in most cases :) Maybe a -r,--run argument?

I'd imagine something like this maybe: cargo install-update -a -r 'cargo quickinstall {}'. For each package to update, cargo-update could then simply replace all occurrences of {} with the crate name.

Thoughts?

nabijaczleweli commented 3 years ago

Try current master branch (at least 84ece88ac846faf020d69a0d1a79ffda5e95501e) — you should be able to set -r/--install-cargo to a wrapper and munge those arguments to whatever your heart desires.

mainrs commented 3 years ago

Awesome, thanks!

nabijaczleweli commented 3 years ago

Released in v5.1.0