Explorar el Código

Fix issue with # as value in config + php 8.1 test bug (#2244)

* Allow the use of # as value in config files

* Fix bug in test

* Adjust space.

Co-authored-by: Raphael Schneeberger <rs@scit.ch>
Jaap Marcus hace 4 años
padre
commit
635aa34aba
Se han modificado 2 ficheros con 3 adiciones y 3 borrados
  1. 2 2
      func/main.sh
  2. 1 1
      test/test.bats

+ 2 - 2
func/main.sh

@@ -1347,7 +1347,7 @@ source_conf(){
   while IFS='= ' read -r lhs rhs
   do
       if [[ ! $lhs =~ ^\ *# && -n $lhs ]]; then
-          rhs="${rhs%%\#*}"    # Del in line right comments
+          rhs="${rhs%%^\#*}"   # Del in line right comments
           rhs="${rhs%%*( )}"   # Del trailing spaces
           rhs="${rhs%\'*}"     # Del opening string quotes 
           rhs="${rhs#\'*}"     # Del closing string quotes 
@@ -1376,4 +1376,4 @@ change_sys_value(){
   else
       sed -i "s|^$1=.*|$1='$2'|g" "$HESTIA/conf/hestia.conf"
   fi
-}
+}

+ 1 - 1
test/test.bats

@@ -966,7 +966,7 @@ function check_ip_not_banned(){
         skip "PHP ${test_phpver} not installed"
     fi
 
-    run v-change-web-domain-backend-tpl $user $multi_domain 'PHP-8_0' 'yes'
+    run v-change-web-domain-backend-tpl $user $multi_domain 'PHP-8_1' 'yes'
     assert_success
     refute_output