shuttle icon indicating copy to clipboard operation
shuttle copied to clipboard

feat(cargo-shuttle): Add `upgrade` subcommand to run install script

Open supleed2 opened this issue 1 year ago • 2 comments

Description of change

Adds a function that spawns a child process running the install command, using conditional compilation based on target family (unix vs windows). Closes #1840

How has this been tested? (if applicable)

  • Ran cargo run --bin cargo-shuttle -- upgrade on Windows
    • With latest cargo-shuttle installed: got the expected message that my cargo-shuttle version is latest from binstall
    • Without cargo-shuttle, with cargo-binstall: got output from binstall that binary was downloaded from GitHub
    • Without cargo-shuttle and cargo-binstall: directly downloads binary which works (I realise we didn't add the prompts to the powershell version)
  • Ran cargo run --bin cargo-shuttle -- upgrade on Ubuntu
    • With latest cargo-shuttle installed: got the expected message that my cargo-shuttle version is up-to-date from the bash script
    • Without cargo-shuttle, with cargo-binstall: got output from binstall that binary was downloaded from GitHub
    • Without cargo-shuttle and cargo-binstall: got prompts to download binary directly which works, and to install from source via cargo which also works

supleed2 avatar Jul 28 '24 18:07 supleed2

Can you also test the interactivity of the subprocess, i.e. that the y/n prompts work as intended when you don't have cargo-binstall?

jonaro00 avatar Jul 29 '24 11:07 jonaro00

Thanks for the reminder, just ran through the other scenarios and updated my comment.

supleed2 avatar Jul 30 '24 08:07 supleed2