fix(context): add context finalization iteration limit

This prevents any possibility of an infinite loop during finalization.
This commit is contained in:
2025-10-24 18:44:28 -07:00
parent 2e3399f33f
commit 2a2aa74c09
3 changed files with 25 additions and 7 deletions

View File

@@ -143,7 +143,10 @@ fn main() -> Result<()> {
// Insert the values from the entry configuration into the
// sprout context to use with the entry itself.
context.insert(&entry.declaration().values);
let context = context.finalize().freeze();
let context = context
.finalize()
.context("unable to finalize context")?
.freeze();
// Provide the new context to the bootable entry.
entry.swap_context(context);
// Restamp the title with any values.