pub fn which(tool: &str) -> Option<String>Expand description
First match for tool on PATH.
Windows executables carry an extension — git is git.exe, an npm-installed
eslint is eslint.cmd — so the bare name finds nothing there. PATHEXT is
the OS’s own list of what counts as executable; fall back to the usual set
when it is unset. Found by the Windows CI job on its first run, where
which("git") returned None on a machine that plainly has git.