mirror of
https://github.com/philmmanjaro/alma.git
synced 2025-12-06 19:29:21 +01:00
Be more informative about missing binaries
This commit is contained in:
committed by
Philip Mueller
parent
21e11151c8
commit
60438bac5c
@@ -2,6 +2,7 @@ mod chroot;
|
|||||||
mod mount;
|
mod mount;
|
||||||
mod qemu;
|
mod qemu;
|
||||||
|
|
||||||
|
use anyhow::Context;
|
||||||
pub use chroot::chroot;
|
pub use chroot::chroot;
|
||||||
pub use mount::mount;
|
pub use mount::mount;
|
||||||
pub use qemu::qemu;
|
pub use qemu::qemu;
|
||||||
@@ -17,7 +18,9 @@ pub struct Tool {
|
|||||||
|
|
||||||
impl Tool {
|
impl Tool {
|
||||||
pub fn find(name: &'static str) -> anyhow::Result<Self> {
|
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 {
|
pub fn execute(&self) -> Command {
|
||||||
|
|||||||
Reference in New Issue
Block a user