Skip to main content

probe_version

Function probe_version 

Source
pub fn probe_version(program: &str) -> Option<String>
Expand description

Ask a CLI for its version, on the augmented PATH. None when it cannot be run, exits non-zero, or says nothing — each of which means the same thing to a caller: this is not an installed, working CLI.

Every adapter wrapping a CLI needs exactly this, and it is the probe that decides whether a harness reads as installed at all — so it lives once, beside hidden_command and augmented_path, rather than being copied per adapter and drifting.