From 34f02cf83d155fc5efee9970994d3a83ab58c284 Mon Sep 17 00:00:00 2001 From: mo8it Date: Thu, 8 Aug 2024 22:37:56 +0200 Subject: [PATCH] Attach error message as context --- src/watch.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/watch.rs b/src/watch.rs index 88a12301..c6690304 100644 --- a/src/watch.rs +++ b/src/watch.rs @@ -102,8 +102,7 @@ pub fn watch( watch_state.render()?; } WatchEvent::NotifyErr(e) => { - watch_state.into_writer().write_all(NOTIFY_ERR.as_bytes())?; - return Err(Error::from(e)); + return Err(Error::from(e).context(NOTIFY_ERR)); } WatchEvent::TerminalEventErr(e) => { return Err(Error::from(e).context("Terminal event listener failed"));