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.

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
  • version - Optional specific version to install
  • force - Force installation even if already up-to-date
  • install_dir - Optional custom installation directory

§Panics

May panic if stdout flush fails or stdin read fails during user confirmation.