diff --git a/lib/common.sh b/lib/common.sh index 793fbf0..f849132 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -96,9 +96,9 @@ save_env_var() { return 1 fi - # Escape special characters in value for sed + # Escape special characters in value for sed (delimiter is |) local escaped_value - escaped_value=$(printf '%s' "$value" | sed 's/[&/\]/\\&/g') + escaped_value=$(printf '%s' "$value" | sed 's/[&/\|]/\\&/g') if grep -q "^${key}=" "$env_file"; then # Replace existing line — match KEY= followed by anything (value + optional comment)