aboutsummaryrefslogtreecommitdiffstats
path: root/worker/notmuch
diff options
context:
space:
mode:
Diffstat (limited to 'worker/notmuch')
-rw-r--r--worker/notmuch/worker.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/worker/notmuch/worker.go b/worker/notmuch/worker.go
index 6d8e46d2..3b4bd5dc 100644
--- a/worker/notmuch/worker.go
+++ b/worker/notmuch/worker.go
@@ -688,6 +688,7 @@ func (w *worker) sort(uids []uint32,
}
func (w *worker) handleCheckMail(msg *types.CheckMail) {
+ defer log.PanicHandler()
if msg.Command == "" {
w.err(msg, fmt.Errorf("checkmail: no command specified"))
return
@@ -697,6 +698,7 @@ func (w *worker) handleCheckMail(msg *types.CheckMail) {
cmd := exec.CommandContext(ctx, "sh", "-c", msg.Command)
ch := make(chan error)
go func() {
+ defer log.PanicHandler()
err := cmd.Run()
ch <- err
}()