Bug 16749: Check instancename in adjust_paths_dev_install
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 16 Feb 2017 13:33:57 +0000 (14:33 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 17 Feb 2017 13:20:58 +0000 (13:20 +0000)
Check if the instance does not exist (or was not even passed).

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
debian/scripts/koha-functions.sh

index 1fdfe83..256ae2b 100755 (executable)
@@ -222,7 +222,11 @@ adjust_paths_dev_install()
 # corresponding tag in koha-conf.xml
 
     local instancename=$1
-    local dev_install=$(run_safe_xmlstarlet $instancename dev_install)
+    local dev_install=""
+
+    if [ "$instancename" != "" ] && is_instance $instancename; then
+        dev_install=$(run_safe_xmlstarlet $instancename dev_install)
+    fi
 
     if [ "$dev_install" != "" ] && [ "$dev_install" != "0" ]; then
         DEV_INSTALL=1