diff --git a/crates/boot/src/main.rs b/crates/boot/src/main.rs index 12a60e5..377eb0c 100644 --- a/crates/boot/src/main.rs +++ b/crates/boot/src/main.rs @@ -261,9 +261,6 @@ fn run() -> Result<()> { BootloaderInterface::set_entries(entries.iter().map(|entry| entry.name())) .context("unable to set entries in bootloader interface")?; - // Execute the late phase. - phase(context.clone(), &config.phases.late).context("unable to execute late phase")?; - // Acquire the timeout setting from the bootloader interface. let bootloader_interface_timeout = BootloaderInterface::get_timeout().context("unable to get bootloader interface timeout")?; @@ -355,6 +352,9 @@ fn run() -> Result<()> { BootloaderInterface::set_selected_entry(entry.name().to_string()) .context("unable to set selected entry in bootloader interface")?; + // Execute the late phase, now that the entry is chosen but before its actions are executed. + phase(context.clone(), &config.phases.late).context("unable to execute late phase")?; + // Execute all the actions for the selected entry. for action in &entry.declaration().actions { let action = entry.context().stamp(action);