pub fn require_tools(tools: &[(&str, &str, Option<&str>)]) -> Result<(), String>Expand description
Check that a batch of external tools is available, returning a single error that lists every missing one with its install hint.
Each entry is (executable, install_hint, probe):
probe = Some(arg)runs<executable> <arg>(e.g.Some("--version"), orSome("version")forkoji, orSome("--help")forpbuilder-dist) and requires a zero exit, confirming the tool actually executes.probe = Nonechecks only$PATHexistence, for tools with no usable version/help flag.
All entries are checked, so the error names every missing tool rather than failing on the first.
ยงExample
sandogasa_cli::require_tools(&[
("git", "sudo apt install git", Some("--version")),
("pbuilder-dist", "sudo apt install ubuntu-dev-tools", Some("--help")),
])
.unwrap();