feat: readd pkgfile (slowdown due to missing db)

This commit is contained in:
iff 2024-12-08 00:08:21 +01:00
parent 03c103d010
commit 678b569652

View file

@ -99,10 +99,11 @@ pub fn get_packages(data: &mut Data, package_manager: &str, executable: &str) ->
} }
} }
"pacman" => { "pacman" => {
// somehow it tries to always update, so very slow let result = if data.has_executable("pkgfile") {
// let result = if data.has_executable("pkgfile") { command_output(shell, &format!("pkgfile -b {}", executable))
// command_output(shell, &format!("pkgfile -b {}", executable)) } else{
let result = command_output(shell, &format!("pacman -Fq /usr/bin/{}", executable)); command_output(shell, &format!("pacman -Fq /usr/bin/{}", executable))
};
if result.is_empty() { if result.is_empty() {
return None return None
} }