Make changed variables' old values available in config panels scripts

This commit is contained in:
tituspijean 2022-05-20 00:09:46 +02:00
parent 8a0a33a0de
commit 6cc4ce83ae
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720

View file

@ -90,6 +90,7 @@ _ynh_app_config_apply_one() {
# Save value in app settings
elif [[ "$bind" == "settings" ]]; then
declare -g "old_$short_setting"=$(ynh_app_setting_get --app=$app --key=$short_setting)
ynh_app_setting_set --app=$app --key=$short_setting --value="${!short_setting}"
ynh_print_info --message="Configuration key '$short_setting' edited in app settings"