Terminate execution if config file is missing

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
nodivbyzero 2018-03-16 20:17:03 +00:00 committed by Lukas Fleischer
parent bcd795c339
commit 3d90623154

View file

@ -8,7 +8,11 @@ function config_load() {
if (!$path) { if (!$path) {
$path = "/etc/aurweb/config"; $path = "/etc/aurweb/config";
} }
if (file_exists($path)) {
$AUR_CONFIG = parse_ini_file($path, true, INI_SCANNER_RAW); $AUR_CONFIG = parse_ini_file($path, true, INI_SCANNER_RAW);
} else {
die("aurweb config file not found");
}
} }
} }