Browse Source

Merge pull request #5029 from scruel/patch-2

Prevent leaving blank lines in config file after cleared keys.
pull/5036/merge
neil 6 days ago
committed by GitHub
parent
commit
8635d89cc8
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      acme.sh

2
acme.sh

@ -2361,7 +2361,7 @@ _clear_conf() {
_sdkey="$2" _sdkey="$2"
if [ "$_c_c_f" ]; then if [ "$_c_c_f" ]; then
_conf_data="$(cat "$_c_c_f")" _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 else
_err "Config file is empty, cannot clear" _err "Config file is empty, cannot clear"
fi fi

Loading…
Cancel
Save