MCPcopy Create free account
hub / github.com/KingOfBugbounty/enumrust / check_tool_installed

Function check_tool_installed

src/main.rs:4127–4136  ·  view source on GitHub ↗

Check if a tool is installed and get its version (with auto-discovery)

(binary: &str)

Source from the content-addressed store, hash-verified

4125
4126/// Check if a tool is installed and get its version (with auto-discovery)
4127async fn check_tool_installed(binary: &str) -> (bool, Option<String>) {
4128 // Use discovery to find tool in common paths
4129 if discover_tool_path(binary).is_none() {
4130 return (false, None);
4131 }
4132
4133 // Try to get version
4134 let version = get_tool_version(binary).await;
4135 (true, version)
4136}
4137
4138/// Strip ANSI escape codes from a string
4139fn strip_ansi_codes(s: &str) -> String {

Callers 2

check_tools_statusFunction · 0.85
install_all_toolsFunction · 0.85

Calls 2

discover_tool_pathFunction · 0.85
get_tool_versionFunction · 0.85

Tested by

no test coverage detected