feat(cli): probe the image tooling

The run path shells out to mkfs.ext4 and debugfs from e2fsprogs; a
host without them fails at the first pull, so probe names them up
front like it names KVM and the engine.
This commit is contained in:
vhaudiquet committed 2026-10-30 19:10:59 +01:00
1 parent 27b22c60ab
commit 17e0d91527
1 file changed
+17
+17
View File
@@ -142,6 +142,23 @@ fn cmd_probe() -> std::process::ExitCode {
}
}
print!("e2fsprogs: ");
let mut tools_ok = true;
for tool in ["mkfs.ext4", "debugfs"] {
match std::process::Command::new(tool).arg("-V").output() {
Ok(_) => {}
Err(err) => {
ok = false;
tools_ok = false;
println!("missing {tool} ({err}); the rootfs image cannot be built");
break;
}
}
}
if tools_ok {
println!("ok");
}
print!("cache: ");
match ecrou::cache::RootfsCache::default_dir() {
Ok(dir) => {