Skip to main content

run_update

Function run_update 

Source
pub fn run_update(
    repo_info: &RepoInfo,
    _current_version: &str,
    version: Option<&str>,
    force: bool,
    install_dir: Option<&Path>,
) -> i32
Expand description

Run update command to install latest or specified version.

This delegates to the install.sh script, which handles version checking, download, checksum verification, and installation.

Returns exit code: 0 if successful, 1 on error, 2 if already up-to-date.

§Arguments

  • repo_info - Repository information for GitHub integration
  • _current_version - Current version of the tool (unused, install.sh detects this)
  • version - Optional specific version to install (currently unsupported, always installs latest)
  • force - Force reinstall even if already up-to-date
  • install_dir - Optional custom installation directory

§Panics

May panic if stdout flush fails during user interaction.