Am 18/04/2024 um 10:48 schrieb Christoph Heiss:
> Do we really need _yet another_ crate dependency for that? Below is a
> check / bail! anyway when running the command proper.
> 
> And if we really want a explicit check beforehand, I'd just do something
> like
> 
>   fn which(name: &str) -> Result<()> {
>       match Command::new(name).output() {
>           Ok(_) => Ok(()),
>           Err(err) => Err(err.into()),
>       }
>   }


yeah, +1. I'd just catch the error and execute and wrap it as nicely as
possibly to convey to the user that xorriso is required somewhere in $PATH.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to