From a422b6c16ffc57df375b65460c6fe384a5a9eb1d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 5 Dec 2022 19:22:29 +0100 Subject: [PATCH] Fix upgrade exploding because path_url ends up being empty string ... --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 28d6fa1..6b21736 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -70,8 +70,8 @@ ynh_permission_update --permission="main" --add="visitors" if [ $is_public -eq 0 ] then domain_regex=$(echo "$domain" | sed 's@-@.@g') - [ "$path_url" = "/" ] && path_url="" - ynh_app_setting_set --app=$app --key=protected_regex --value="$domain_regex$path_url/$","$domain_regex$path_url/admin.php.*$" + [ "$path_url" = "/" ] && path_url_="" || path_url_="$path_url" + ynh_app_setting_set --app=$app --key=protected_regex --value="$domain_regex$path_url_/$","$domain_regex$path_url_/admin.php.*$" fi #=================================================