diff options
Diffstat (limited to 'worker/maildir')
-rw-r--r-- | worker/maildir/worker.go | 9 |
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 { |