From e5a15dfb4923dbcaf5a04919841e0c468794c340 Mon Sep 17 00:00:00 2001 From: JMARyA Date: Wed, 9 Apr 2025 15:25:25 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=EF=B8=8F=20fix=20config=20print?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/print.rs | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/src/print.rs b/src/print.rs index 549594f..3b5af3d 100644 --- a/src/print.rs +++ b/src/print.rs @@ -8,21 +8,26 @@ pub fn print_config(conf: &InstallConfig) { let mut root_info = Tree::new(); let mut drive_info = Tree::new(); - drive_info.add_str(format!( - "💾 {} {}", - conf.drive.boot.as_ref().unwrap().paint(Color::Red), - "[EFI]".paint(Color::Blue) - )); - drive_info.add_str(format!( - "{} {} {}", - if conf.drive.encryption.is_some() { - "🔒" - } else { - "💾" - }, - conf.drive.root.as_ref().unwrap().paint(Color::Red), - "[ROOT]".paint(Color::Blue) - )); + + if let Some(disk) = conf.drive.disk.as_ref() { + drive_info.add_str(format!("🖴 {}", disk.paint(Color::Red))); + } else { + drive_info.add_str(format!( + "💾 {} {}", + conf.drive.boot.as_ref().unwrap().paint(Color::Red), + "[EFI]".paint(Color::Blue) + )); + drive_info.add_str(format!( + "{} {} {}", + if conf.drive.encryption.is_some() { + "🔒" + } else { + "💾" + }, + conf.drive.root.as_ref().unwrap().paint(Color::Red), + "[ROOT]".paint(Color::Blue) + )); + } root_info.add_tree("💾 Drive Selection", drive_info);