]> git.proxmox.com Git - pve-installer.git/commitdiff
assistant: improve check if xorriso is installed
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 19 Apr 2024 17:20:03 +0000 (19:20 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 22 Apr 2024 12:31:37 +0000 (14:31 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
proxmox-auto-install-assistant/src/main.rs

index 0f9ac572962102cdfe41e93d633fb96e04cb4c79..c4ff29870b12f72ab9864c91d115e499d40c14ca 100644 (file)
@@ -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(())