Skip to main content

binary_available

Function binary_available 

Source
pub fn binary_available(name: &str) -> bool
Expand description

What: Check whether an external binary is available on the system.

Inputs:

  • name: Binary name to probe (for example, "paru" or "fakeroot").

Output:

  • true when spawning <name> --version succeeds, false otherwise.

Details:

  • Runs <name> --version with stdin, stdout, and stderr attached to the null device, so nothing leaks to the terminal.
  • Only spawn success is checked (output().is_ok()); the exit status is intentionally ignored, matching the historical capability probes.