From 71b7a24462c93301037fbe5cfbff317d9c0fb0ef Mon Sep 17 00:00:00 2001 From: Marc Ole Bulling Date: Sun, 22 Mar 2020 16:20:12 +0100 Subject: [PATCH] Added check if all dependencies are installed and config.php/config-dist.php exists --- helpers/PrerequisiteChecker.php | 38 +++++++++++++++++++++++++++++++++ public/index.php | 10 +++++++++ 2 files changed, 48 insertions(+) create mode 100644 helpers/PrerequisiteChecker.php diff --git a/helpers/PrerequisiteChecker.php b/helpers/PrerequisiteChecker.php new file mode 100644 index 00000000..4fc17d41 --- /dev/null +++ b/helpers/PrerequisiteChecker.php @@ -0,0 +1,38 @@ + \ No newline at end of file diff --git a/public/index.php b/public/index.php index 64e013e1..f65a1f7a 100644 --- a/public/index.php +++ b/public/index.php @@ -1,3 +1,13 @@ checkRequirements(); +} catch (ERequirementNotMet $e) { + die("Unable to run grocy: " . $e->getMessage()); +} + require_once __DIR__ . '/../app.php'; + +?> \ No newline at end of file