cli: fix closing incorrectly if updated failed (#215595)

This commit is contained in:
Connor Peet
2024-06-14 15:54:51 -07:00
committed by GitHub
parent d32e093374
commit 03d781a755

View File

@@ -920,9 +920,14 @@ async fn handle_update(
info!(log, "Updating CLI to {}", latest_release);
updater
let r = updater
.do_update(&latest_release, SilentCopyProgress())
.await?;
.await;
if let Err(e) = r {
did_update.store(false, Ordering::SeqCst);
return Err(e);
}
Ok(UpdateResult {
up_to_date: true,