[fix] Allow to do replace string with @

This commit is contained in:
ljf (zamentur) 2023-02-06 13:26:36 +01:00 committed by GitHub
parent 4dee434e71
commit f742bdf832
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 "$@"
set +o xtrace # set +x
local delimit=@
local delimit=$'\001'
# Escape the delimiter if it's in the string.
match_string=${match_string//${delimit}/"\\${delimit}"}
replace_string=${replace_string//${delimit}/"\\${delimit}"}