just
just copied to clipboard
`executable_exists` function to check whether a certain program exists and is executable on the path
As an example I want my install scripts to use nala if available and fall back to apt-get if not.
This seems reasonable. I think the only question is how to do it in a cross-platform way without relying on any particular shell.
Looks like crates exist for this: https://crates.io/crates/which