Skip to main content

require_tool

Function require_tool 

Source
pub fn require_tool(name: &str, install_hint: &str) -> Result<(), String>
Expand description

Check that an external tool is available in $PATH.

Runs <name> --version and returns Ok(()) if it exits successfully, or an error message with the install hint.

ยงExample

sandogasa_cli::require_tool("fedrq", "sudo dnf install fedrq").unwrap();