Skip to content

Commit 0067a47

Browse files
committed
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: #234 Signed-off-by: John Eckersberg <[email protected]>
1 parent 491396e commit 0067a47

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/src/cli.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,10 @@ async fn upgrade(opts: UpgradeOpts) -> Result<()> {
356356
.unwrap_or_default();
357357
if staged_unchanged {
358358
println!("Staged update present, not changed.");
359+
360+
if opts.apply {
361+
crate::reboot::reboot()?;
362+
}
359363
} else if booted_unchanged {
360364
println!("No update available.")
361365
} else {

0 commit comments

Comments
 (0)