Skip to main content

finalize_auto_update_check

Function finalize_auto_update_check 

Source
pub fn finalize_auto_update_check(handle: AutoUpdateHandle)
Expand description

Print the update banner (if any) before the binary exits. Waits up to one second for an in-flight background check to finish; on timeout, falls back to the previously-cached release so the user still gets the nudge.

kaishin 0.4 made check_and_save return Result<Option<_>>, so the “fetched, no update” case (Ok(Ok(None))) is now distinct from a timeout/error: in that case we skip the banner entirely instead of falling back to cache, since the cache can’t be newer than the fresh fetch we just completed. Timeout/error still falls back to cache so a slow GitHub doesn’t suppress the nudge.