Skip to main content

detect_linux_package_manager

Function detect_linux_package_manager 

Source
async fn detect_linux_package_manager() -> Option<LinuxPackageManager>
Expand description

Probe for a Linux system package manager on PATH, in priority order — first match wins (a system with both apt-get and an unrelated manually-installed tool named e.g. dnf should still prefer the native one). Every mainstream Linux distro ships with exactly one of these as part of the base OS — unlike Homebrew/winget, there is no “package manager itself might be missing” case to handle here.