Merge pull request #1171 from YunoHost/fix-replace-string-escape

Gotta escape \ during ynh_replace_vars
This commit is contained in:
Alexandre Aubin 2021-02-23 14:24:51 +01:00 committed by GitHub
commit d0088053fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -396,6 +396,7 @@ ynh_replace_vars () {
match_string="__${one_var^^}__"
match_string=${match_string//${delimit}/"\\${delimit}"}
replace_string="${!one_var}"
replace_string=${replace_string//\\/\\\\}
replace_string=${replace_string//${delimit}/"\\${delimit}"}
# Actually replace (sed is used instead of ynh_replace_string to avoid triggering an epic amount of debug logs)