From 15d7b8ea8c1d75eb7f8613df484a82df6e084123 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 7 Mar 2019 10:28:35 +0100 Subject: lib/helper.php: check if pacman db exists before running shell command --- lib/helper.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/helper.php') diff --git a/lib/helper.php b/lib/helper.php index 29902b7..64f167e 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -215,6 +215,8 @@ function find_upstream_packages_in($repo) { $parse_package_filename_in_repo = function($filename) use ($repo) { return parse_package_filename($filename, $repo); }; + if (!file_exists("/var/lib/pacman/sync/" . $repo . ".db") + return NULL; return array_map( $parse_package_filename_in_repo, -- cgit v1.2.3-70-g09d2