Skip to content

Commit 8635d89

Browse files
authored
Merge pull request #5029 from scruel/patch-2
Prevent leaving blank lines in config file after cleared keys.
2 parents dc341ef + bd3a2b1 commit 8635d89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

acme.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2361,7 +2361,7 @@ _clear_conf() {
23612361
_sdkey="$2"
23622362
if [ "$_c_c_f" ]; then
23632363
_conf_data="$(cat "$_c_c_f")"
2364-
echo "$_conf_data" | sed "s/^$_sdkey *=.*$//" >"$_c_c_f"
2364+
echo "$_conf_data" | sed "/^$_sdkey *=.*$/d" >"$_c_c_f"
23652365
else
23662366
_err "Config file is empty, cannot clear"
23672367
fi

0 commit comments

Comments
 (0)