From 198ee3928f5288c8c8d9ad7cb149616411066328 Mon Sep 17 00:00:00 2001 From: Nicolas Cantu Date: Mon, 6 Apr 2026 13:02:18 +0200 Subject: [PATCH 3/3] fix: handle notify-send errors Log failures when spawning notify-send on unix to avoid unused-variable warnings and make errors visible. diff --git a/lapce-app/src/app/logging.rs b/lapce-app/src/app/logging.rs index bbc0586..335ddb1 100644 --- a/lapce-app/src/app/logging.rs +++ b/lapce-app/src/app/logging.rs @@ -137,7 +137,7 @@ pub(super) fn error_modal(title: &str, msg: &str) -> i32 { #[cfg(unix)] pub fn error_notification(title: &str, msg: &str) { - let res = std::process::Command::new("notify-send") + if let Err(e) = std::process::Command::new("notify-send") .args([ "-a", "dev.lapce.lapce", @@ -149,5 +149,8 @@ pub fn error_notification(title: &str, msg: &str) { title, msg, ]) - .spawn(); + .spawn() + { + tracing::warn!("notify-send failed: {e}"); + } }