From 0ddcce22e69a9589169d1108c330916c9cf0587e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Capucho?= Date: Fri, 15 Apr 2022 20:50:05 +0100 Subject: [PATCH] check the global config for notify-cmd (#362) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This brings it in line with how notify-query works and how the wiki defines it to also be a global option. Co-authored-by: Clément DOUIN --- cli/src/config/account_config.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cli/src/config/account_config.rs b/cli/src/config/account_config.rs index 0d32a19..22a0052 100644 --- a/cli/src/config/account_config.rs +++ b/cli/src/config/account_config.rs @@ -146,7 +146,11 @@ impl<'a> AccountConfig { downloads_dir, sig, default_page_size, - notify_cmd: base_account.notify_cmd.clone(), + notify_cmd: base_account + .notify_cmd + .as_ref() + .or_else(|| config.notify_cmd.as_ref()) + .cloned(), notify_query: base_account .notify_query .as_ref()