diff --git a/crates/boot/src/generators/bls.rs b/crates/boot/src/generators/bls.rs index 2dbadb6..bf9bb8c 100644 --- a/crates/boot/src/generators/bls.rs +++ b/crates/boot/src/generators/bls.rs @@ -10,6 +10,7 @@ use anyhow::{Context, Result}; use core::{cmp::Ordering, str::FromStr}; use edera_sprout_bls::{BlsEntry, sort_bls}; use edera_sprout_config::generators::bls::BlsConfiguration; +use log::warn; use uefi::{ cstr16, fs::{FileSystem, PathBuf}, @@ -105,15 +106,33 @@ pub fn generate(context: Rc, bls: &BlsConfiguration) -> Result content, + Err(error) => { + warn!("unable to read bls entry {}: {}", name, error); + continue; + } + }; // Parse the entry file as a UTF-8 string. - let content = String::from_utf8(content).context("unable to read bls entry as utf8")?; + let content = match String::from_utf8(content) { + Ok(content) => content, + Err(error) => { + warn!("unable to read bls entry {} as utf8: {}", name, error); + continue; + } + }; // Parse the entry file as a BLS entry. - let entry = BlsEntry::from_str(&content).context("unable to parse bls entry")?; + let entry = match BlsEntry::from_str(&content) { + Ok(entry) => entry, + Err(error) => { + warn!("unable to parse bls entry {}: {}", name, error); + continue; + } + }; // Ignore entries that are not valid for Sprout. if !entry.is_valid() {