🚑️ fix config print
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
JMARyA 2025-04-09 15:25:25 +02:00
parent 9c1dca651b
commit e5a15dfb49
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263

View file

@ -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);