Skip to content

Commit e379128

Browse files
author
Winni Neessen
committed
Still trying to fix the GH issues with MacOS' broken pipe
1 parent 8f9fc61 commit e379128

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

msg.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"os"
1313
"os/exec"
1414
"path/filepath"
15+
"syscall"
1516
"time"
1617
)
1718

@@ -532,7 +533,9 @@ func (m *Msg) WriteToSendmailWithContext(ctx context.Context, sp string, a ...st
532533
}
533534
_, err = m.Write(si)
534535
if err != nil {
535-
return fmt.Errorf("failed to write mail to buffer: %w", err)
536+
if !errors.Is(err, syscall.EPIPE) {
537+
return fmt.Errorf("failed to write mail to buffer: %w", err)
538+
}
536539
}
537540

538541
// Read the stderr pipe for possible errors

0 commit comments

Comments
 (0)