casey / just

🤖 Just a command runner
https://just.systems
Creative Commons Zero v1.0 Universal
21.12k stars 467 forks source link

`executable_exists` function to check whether a certain program exists and is executable on the path #2109

Open IndianBoy42 opened 5 months ago

IndianBoy42 commented 5 months ago

As an example I want my install scripts to use nala if available and fall back to apt-get if not.

casey commented 5 months ago

This seems reasonable. I think the only question is how to do it in a cross-platform way without relying on any particular shell.

IndianBoy42 commented 5 months ago

Looks like crates exist for this: https://crates.io/crates/which