Skip to content

Commit

Permalink
Merge pull request #5029 from scruel/patch-2
Browse files Browse the repository at this point in the history
Prevent leaving blank lines in config file after cleared keys.
  • Loading branch information
Neilpang authored Sep 15, 2024
2 parents dc341ef + bd3a2b1 commit 8635d89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion acme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2361,7 +2361,7 @@ _clear_conf() {
_sdkey="$2"
if [ "$_c_c_f" ]; then
_conf_data="$(cat "$_c_c_f")"
echo "$_conf_data" | sed "s/^$_sdkey *=.*$//" >"$_c_c_f"
echo "$_conf_data" | sed "/^$_sdkey *=.*$/d" >"$_c_c_f"
else
_err "Config file is empty, cannot clear"
fi
Expand Down

0 comments on commit 8635d89

Please sign in to comment.