Skip to content

Commit

Permalink
upgrade: fix --apply when the desired deployment is already staged
Browse files Browse the repository at this point in the history
Previously, running:

`bootc update; bootc update --apply`

would result in the system not rebooting to apply the
previously-staged deployment.

Closes: containers#234
Signed-off-by: John Eckersberg <[email protected]>
  • Loading branch information
jeckersb committed Jan 11, 2024
1 parent 491396e commit 0067a47
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0067a47

Please sign in to comment.