horizon-server update: report a switch without an install instead of staying busy

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-19 05:31:08 +02:00
parent bf2c5e7946
commit 3ce89ebb8a
+7 -1
View File
@@ -264,7 +264,13 @@ fn switch(
to: &str,
timeout: Duration,
) -> Option<Watch> {
let install = shared.install.as_ref()?;
let Some(install) = shared.install.as_ref() else {
shared.finish_update(
false,
"Not updated: this horizon-server wasn't installed".into(),
);
return None;
};
let Some(from) = install.current() else {
shared.finish_update(false, "Not updated: `current` points at no release".into());
return None;