Skip to main content

available

Function available 

Source
pub fn available<F>(resolve: F) -> Vec<BackendAvailability>
where F: Fn(&str) -> Option<PathBuf>,
Expand description

Which backends the user actually has, given a binary resolver.

resolve is injected rather than calling a which helper directly: this crate is consumed by the Hub, the runtime and the CLI, each of which resolves binaries differently (the Hub must ask an interactive login shell, because a Finder-launched app inherits a bare PATH). Injection also makes every case below testable without touching the real PATH.