pub fn detect_aur_helper() -> Option<AurHelper>Expand description
What: Detect the preferred AUR helper available on PATH.
Inputs: None.
Output:
Some(AurHelper::Paru)whenparuis available.Some(AurHelper::Yay)when onlyyayis available.Nonewhen neither helper is installed.
Details:
- Preference order (paru first, yay fallback) matches Pacsea’s install flow.
- Detection is explicit: command builders never call this implicitly, so callers can override the choice (e.g., from user configuration).
§Example
use arch_toolkit::install::detect_aur_helper;
match detect_aur_helper() {
Some(helper) => println!("Using AUR helper: {helper}"),
None => eprintln!("No AUR helper (paru/yay) found."),
}