Merge pull request #1789 from YunoHost/fix_config_panel_return_value

Use single quote to return value to config panel
This commit is contained in:
Alexandre Aubin 2024-03-19 18:06:47 +01:00 committed by GitHub
commit cbe13831a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -151,7 +151,7 @@ for panel_name, panel in loaded_toml.items():
bind_section = bind_section + bind_panel_file
else:
bind_section = regex + bind_section + bind_panel_file
for name, param in section.items():
if not isinstance(param, dict):
continue
@ -204,8 +204,7 @@ _ynh_app_config_show() {
ynh_return "${short_setting}:"
ynh_return "$(echo "${old[$short_setting]}" | sed 's/^/ /g')"
else
ynh_return "${short_setting}: "'"'"$(echo "${old[$short_setting]}" | sed 's/"/\\"/g' | sed ':a;N;$!ba;s/\n/\n\n/g')"'"'
ynh_return "${short_setting}: '$(echo "${old[$short_setting]}" | sed "s/'/''/g" | sed ':a;N;$!ba;s/\n/\n\n/g')'"
fi
fi
done