Check if a tool is installed and get its version (with auto-discovery)
(binary: &str)
| 4125 | |
| 4126 | /// Check if a tool is installed and get its version (with auto-discovery) |
| 4127 | async 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 |
| 4139 | fn strip_ansi_codes(s: &str) -> String { |
no test coverage detected