From 18ff508fe527481b2b7018dfbb5ed57ff0ad3f2628250279c5dfd2f179b5c748 Mon Sep 17 00:00:00 2001 From: kira Date: Sat, 24 Oct 2026 17:51:10 +0200 Subject: [PATCH] Fix for get_efi_part_info (regexp fix) --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/hive_system.rs | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 413423d..58ee0c0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -152,7 +152,7 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hive-up" -version = "0.2.8" +version = "0.2.9" dependencies = [ "clap", "nix", diff --git a/Cargo.toml b/Cargo.toml index 18c7028..acf30a7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hive-up" -version = "0.2.8" +version = "0.2.9" edition = "2024" [dependencies] diff --git a/src/hive_system.rs b/src/hive_system.rs index e69e53d..dc4d390 100644 --- a/src/hive_system.rs +++ b/src/hive_system.rs @@ -114,7 +114,7 @@ impl std::fmt::Display for ExecCommandError { write!(f, "IO streem to String parse Error: {}", e) } ExecCommandError::CommandFailed(ex) => { - write!(f, "{}", ex) + write!(f, "{}", ex.to_string()) } ExecCommandError::Other(msg) => write!(f, "Error: {}", msg), } @@ -498,7 +498,7 @@ pub fn check_if_run_as_root() -> bool { /// fn get_efi_part_info() -> Result<(String, String), ExecCommandError> { use regex_lite::Regex; - let re = Regex::new(r#"^PARTN="([0-9]+)" PKNAME="([a-zA-Z0-9]+)"$"#).unwrap(); + let re = Regex::new(r#"^PARTN="([0-9]+)" PKNAME="([a-zA-Z0-9]+)""#).unwrap(); let lsblk_query = format!("PARTLABEL==\"{}\"", EFI_PARTLABEL); let lsblk_args: Vec<&str> = vec!["-P", "-p", "-Q", &lsblk_query, "-o", "PARTN,PKNAME"]; @@ -604,6 +604,7 @@ pub fn init_efi_boot_record(maybe_kernel_cmd: &Option) -> Result<(), Exe // 1 delete all bootnums delete_all_efi_bootnums()?; // 2 create defaul + println!("Creating EFI boot records..."); efi_boot_record_create(0, BOOT_MENU_LABEL, BOOT_UKI_IMAGE_NAME, maybe_kernel_cmd)?; efi_boot_record_create( 1,