This commit is contained in:
Scruel Tao 2024-06-14 09:36:44 +00:00 committed by GitHub
commit 9ec1f1502c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2354,7 +2354,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