commit 649a41c9ad4b6537ede72a5803fb43be940e45bd parent 3ab678c3f435566150377ed25d9c96d20e3f187d Author: Cem Keylan <cem@ckyln.com> Date: Mon, 12 Jul 2021 23:11:26 +0300 set_msmtp(): also check the contents of msmtp config Diffstat:
M | bin/muw | | | 6 | +++++- |
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/bin/muw b/bin/muw @@ -536,7 +536,11 @@ EOF } set_msmtp() { - [ -f "$config_home/msmtp/config" ] || msmtp_header + # 'A && B || C' is intentional behaviour here. We want all of these checks + # to pass. + # shellcheck disable=2015 + [ -f "$config_home/msmtp/config" ] && + [ -s "$config_home/msmtp/config" ] || msmtp_header cat <<EOF >> "$config_home/msmtp/config" account $title