Browse Source
Merge pull request #4349 from tcx4c70/fix/save-conf
Fix error during saving conf
pull/4365/head
neil
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
0 deletions
-
acme.sh
|
|
@ -2266,6 +2266,9 @@ _setopt() { |
|
|
|
if _contains "$__val" "&"; then |
|
|
|
__val="$(echo "$__val" | sed 's/&/\\&/g')" |
|
|
|
fi |
|
|
|
if _contains "$__val" "|"; then |
|
|
|
__val="$(echo "$__val" | sed 's/|/\\|/g')" |
|
|
|
fi |
|
|
|
text="$(cat "$__conf")" |
|
|
|
printf -- "%s\n" "$text" | sed "s|^$__opt$__sep.*$|$__opt$__sep$__val$__end|" >"$__conf" |
|
|
|
|
|
|
@ -2273,6 +2276,9 @@ _setopt() { |
|
|
|
if _contains "$__val" "&"; then |
|
|
|
__val="$(echo "$__val" | sed 's/&/\\&/g')" |
|
|
|
fi |
|
|
|
if _contains "$__val" "|"; then |
|
|
|
__val="$(echo "$__val" | sed 's/|/\\|/g')" |
|
|
|
fi |
|
|
|
text="$(cat "$__conf")" |
|
|
|
printf -- "%s\n" "$text" | sed "s|^#$__opt$__sep.*$|$__opt$__sep$__val$__end|" >"$__conf" |
|
|
|
|
|
|
|