mirror of
https://github.com/philmmanjaro/alma.git
synced 2025-07-24 22:19:28 +02:00
Be more informative about missing binaries
This commit is contained in:
parent
21e11151c8
commit
60438bac5c
@ -2,6 +2,7 @@ mod chroot;
|
||||
mod mount;
|
||||
mod qemu;
|
||||
|
||||
use anyhow::Context;
|
||||
pub use chroot::chroot;
|
||||
pub use mount::mount;
|
||||
pub use qemu::qemu;
|
||||
@ -17,7 +18,9 @@ pub struct Tool {
|
||||
|
||||
impl Tool {
|
||||
pub fn find(name: &'static str) -> anyhow::Result<Self> {
|
||||
Ok(Self { exec: which(name)? })
|
||||
Ok(Self {
|
||||
exec: which(name).context(format!("Cannot find {}", name))?,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn execute(&self) -> Command {
|
||||
|
Loading…
x
Reference in New Issue
Block a user