Skip to content

Commit

Permalink
Prevent leaving blank lines in config file after cleared keys.
Browse files Browse the repository at this point in the history
  • Loading branch information
scruel authored Feb 27, 2024
1 parent aa8cf76 commit bd3a2b1
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 @@ -2351,7 +2351,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, can not clear"
fi
Expand Down

0 comments on commit bd3a2b1

Please sign in to comment.