From db7aa4cc3782b01da21e7739c72c77febcb3d527 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 6 Dec 2017 13:58:04 -0300 Subject: [PATCH] Bug 19760: Die if koha-conf is not accessible We got a lot of support questions because scripts are executed without the correct environment/user. We could die and provide more useful information Tested on my kohadevbox VM by: 1) sudo chmod a-rx /etc/koha/sites/kohadev/koha-conf.xml 2) run help.pl from the command line to produce the desired die message 3) sudo chmod a+rx /etc/koha/sites/kohadev/koha-conf.xml 4) rerun help.pl successfully Signed-off-by: Jon Knight Signed-off-by: Marcel de Rooy Bug 19760: Change wording Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens (cherry picked from commit be960cc0cda7bb8dbe9a55a3a6e5e1aa0812f006) Signed-off-by: Fridolin Somers --- Koha/Config.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Config.pm b/Koha/Config.pm index f89ffb9a33..b0f36f2551 100644 --- a/Koha/Config.pm +++ b/Koha/Config.pm @@ -48,7 +48,7 @@ sub read_from_file { }; if ($@) { - warn "Error reading file $file"; + die "\nError reading file $file.\nTry running this again as the koha instance user (or use the koha-shell command in debian)\n\n"; } return $xml; -- 2.39.5