From 678b569652ab54889f1510012b0d26c8fab059d9 Mon Sep 17 00:00:00 2001 From: iff Date: Sun, 8 Dec 2024 00:08:21 +0100 Subject: [PATCH] feat: readd pkgfile (slowdown due to missing db) --- src/system.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/system.rs b/src/system.rs index 3e5ca2b..ea33944 100644 --- a/src/system.rs +++ b/src/system.rs @@ -99,10 +99,11 @@ pub fn get_packages(data: &mut Data, package_manager: &str, executable: &str) -> } } "pacman" => { - // somehow it tries to always update, so very slow - // let result = if data.has_executable("pkgfile") { - // command_output(shell, &format!("pkgfile -b {}", executable)) - let result = command_output(shell, &format!("pacman -Fq /usr/bin/{}", executable)); + let result = if data.has_executable("pkgfile") { + command_output(shell, &format!("pkgfile -b {}", executable)) + } else{ + command_output(shell, &format!("pacman -Fq /usr/bin/{}", executable)) + }; if result.is_empty() { return None }