aboutsummaryrefslogtreecommitdiff
path: root/src/update.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-11 16:13:17 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-11 16:13:17 +0300
commit55cdf2e8f8af2dd3feebb4bb7d44c9cb7e23b384 (patch)
tree91feb43a39812d63e19fc5068f95dbe0c896e118 /src/update.rs
parente201a647635905a5141bfce335619b0e232b396d (diff)
fix: stabilize integration agent state reports
Diffstat (limited to 'src/update.rs')
-rw-r--r--src/update.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/update.rs b/src/update.rs
index c4c5b162..68528795 100644
--- a/src/update.rs
+++ b/src/update.rs
@@ -563,9 +563,11 @@ pub fn self_update() -> Result<Version, String> {
tracing::warn!("failed to save pending release notes: {e}");
}
let downloaded_update = download_update(&release)?;
+ let updated_exe = downloaded_update.current_exe.clone();
let stopped_server = stop_running_server_for_update(running_server_plan.as_ref(), &release)?;
install_downloaded_update(downloaded_update)?;
eprintln!("updated to v{}", release.version);
+ print_outdated_integration_notice_with_updated_binary(&updated_exe);
if stopped_server {
eprintln!("run herdr again to start the updated server.");
@@ -578,6 +580,16 @@ pub fn self_update() -> Result<Version, String> {
Ok(release.version)
}
+fn print_outdated_integration_notice_with_updated_binary(updated_exe: &Path) {
+ let status = Command::new(updated_exe)
+ .args(["integration", "status", "--outdated-only"])
+ .status();
+
+ if !status.is_ok_and(|status| status.success()) {
+ crate::integration::print_outdated_update_notice();
+ }
+}
+
/// Background update check: only surface availability and release notes.
/// Runs in a background thread at startup.
pub fn auto_update(events: tokio::sync::mpsc::Sender<crate::events::AppEvent>) {