Silence ls errors.

It is expected behavior that sometimes the local file will not be found.
This commit is contained in:
Nicolás A. Ortega Froysa 2024-05-25 18:17:47 +02:00
parent d4f0f15341
commit e9e2737bd4

View File

@ -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);