Skip to content

Commit 56f6ae3

Browse files
authored
fix: handle epipe on stdout and stderr silently (#607)
1 parent cee6b9d commit 56f6ae3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/index.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,15 @@ cli({
2020
application,
2121
errorHandler,
2222
})
23+
24+
process.stdout.on('error', error => {
25+
if (error.code !== 'EPIPE') {
26+
throw error
27+
}
28+
})
29+
30+
process.stderr.on('error', error => {
31+
if (error.code !== 'EPIPE') {
32+
throw error
33+
}
34+
})

0 commit comments

Comments
 (0)