From 0067a47c69d70431246f0de3541cab3e6efb0eda Mon Sep 17 00:00:00 2001 From: John Eckersberg Date: Thu, 11 Jan 2024 14:51:11 -0500 Subject: [PATCH] upgrade: fix --apply when the desired deployment is already staged Previously, running: `bootc update; bootc update --apply` would result in the system not rebooting to apply the previously-staged deployment. Closes: https://github.com/containers/bootc/issues/234 Signed-off-by: John Eckersberg --- lib/src/cli.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/src/cli.rs b/lib/src/cli.rs index dcf6140b4..8f301769c 100644 --- a/lib/src/cli.rs +++ b/lib/src/cli.rs @@ -356,6 +356,10 @@ async fn upgrade(opts: UpgradeOpts) -> Result<()> { .unwrap_or_default(); if staged_unchanged { println!("Staged update present, not changed."); + + if opts.apply { + crate::reboot::reboot()?; + } } else if booted_unchanged { println!("No update available.") } else {