Skip to main content

check_for_updates_startup

Function check_for_updates_startup 

Source
pub async fn check_for_updates_startup(bin_name: &str) -> Result<UpdateStatus>
Expand description

Check for updates on application startup

This function performs a non-blocking update check on startup and logs a warning if the check fails (doesn’t interrupt startup).

§Arguments

  • bin_name - Name of the binary (e.g., “terraphim-agent”)

§Returns

  • Ok(UpdateStatus) - Status of update check
  • Err(anyhow::Error) - Error if check fails

§Example

use terraphim_update::check_for_updates_startup;

async {
    if let Err(e) = check_for_updates_startup("terraphim-agent").await {
        eprintln!("Update check failed: {}", e);
    }
    Ok::<(), anyhow::Error>(())
};