From ca8b8ace70589e52005b840f677211ba46f6d082 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 19 Apr 2024 19:20:03 +0200 Subject: [PATCH] assistant: improve check if xorriso is installed Signed-off-by: Thomas Lamprecht --- proxmox-auto-install-assistant/src/main.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/proxmox-auto-install-assistant/src/main.rs b/proxmox-auto-install-assistant/src/main.rs index 0f9ac57..c4ff298 100644 --- a/proxmox-auto-install-assistant/src/main.rs +++ b/proxmox-auto-install-assistant/src/main.rs @@ -6,7 +6,7 @@ use serde::Serialize; use std::{ collections::BTreeMap, fs, - io::Read, + io::{self, Read}, path::{Path, PathBuf}, process::{Command, Stdio}, }; @@ -556,7 +556,10 @@ fn check_prepare_requirements(args: &CommandPrepareISO) -> Result<()> { bail!("The source ISO file is not able to be installed automatically. Please try a more current one."); } } - Err(_) => bail!("Could not run 'xorriso'. Please install it."), + Err(err) if err.kind() == io::ErrorKind::NotFound => { + bail!("Could not find the 'xorriso' binary. Please install it.") + } + Err(err) => bail!("unexpected error when trying to execute 'xorriso' - {err}"), }; Ok(()) -- 2.39.2