helpers2.1: fix __PATH__/ handling

This commit is contained in:
Alexandre Aubin 2024-06-25 14:15:51 +02:00
parent 9982a77582
commit 997388dc79

View file

@ -111,7 +111,7 @@ _ynh_replace_vars() {
# Specific trick to make sure that __PATH__/ doesn't end up in "//" if $path=/
if [[ "${path:-}" == "/" ]] && grep -q '__PATH__/' $file; then
sed --in-place "s@__PATH__/@${path%/}@g" "$file"
sed --in-place "s@__PATH__/@/@g" "$file"
fi
# Do the replacement