mirror of
https://github.com/vhaudiquet/ecrou.git
synced 2026-11-12 22:22:44 +00:00
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:
1 parent
27b22c60ab
commit
17e0d91527
1 file changed
+17
@@ -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) => {
|
||||
|
||||
Reference in new issue
Block a user