aboutsummaryrefslogtreecommitdiffstats
path: root/worker/maildir/worker.go
diff options
context:
space:
mode:
Diffstat (limited to 'worker/maildir/worker.go')
-rw-r--r--worker/maildir/worker.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/worker/maildir/worker.go b/worker/maildir/worker.go
index de882589..620e6c17 100644
--- a/worker/maildir/worker.go
+++ b/worker/maildir/worker.go
@@ -927,7 +927,14 @@ func (w *Worker) handleCheckMail(msg *types.CheckMail) {
ch := make(chan error)
go func() {
defer log.PanicHandler()
- err := cmd.Run()
+
+ _, err := cmd.Output()
+ if err != nil {
+ var exitError *exec.ExitError
+ if errors.As(err, &exitError) {
+ err = fmt.Errorf("%w\n%s", err, string(exitError.Stderr))
+ }
+ }
ch <- err
}()
select {