Merge pull request #1588 from YunoHost/fix-ynh-replace-string

[fix] Allow to do replace string with @
This commit is contained in:
Alexandre Aubin 2023-02-06 13:33:30 +01:00 committed by GitHub
commit 07f287f680
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,7 +48,7 @@ ynh_replace_string() {
ynh_handle_getopts_args "$@" ynh_handle_getopts_args "$@"
set +o xtrace # set +x set +o xtrace # set +x
local delimit=@ local delimit=$'\001'
# Escape the delimiter if it's in the string. # Escape the delimiter if it's in the string.
match_string=${match_string//${delimit}/"\\${delimit}"} match_string=${match_string//${delimit}/"\\${delimit}"}
replace_string=${replace_string//${delimit}/"\\${delimit}"} replace_string=${replace_string//${delimit}/"\\${delimit}"}