From e9e2737bd481f38d026f9fa5ef6f2c9ddf9d14e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Sat, 25 May 2024 18:17:47 +0200 Subject: [PATCH] Silence ls errors. It is expected behavior that sometimes the local file will not be found. --- pacundo.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pacundo.pl b/pacundo.pl index ab3b91a..1fca413 100755 --- a/pacundo.pl +++ b/pacundo.pl @@ -199,9 +199,9 @@ sub find_local_pkg($pkgmgr, $pkg_name, $pkg_ver='') { return ''; } - $pkg_file = `ls $aur_dir/$pkg_pat | tail -n1`; + $pkg_file = `ls $aur_dir/$pkg_pat 2> /dev/null | tail -n1`; } else { - $pkg_file = `ls /var/cache/pacman/pkg/$pkg_pat | tail -n1`; + $pkg_file = `ls /var/cache/pacman/pkg/$pkg_pat 2> /dev/null | tail -n1`; } chomp($pkg_file);