Skip to content

Commit 9a5c675

Browse files
authored
Silently handle broken pipe on windows for yes
1 parent aa218a3 commit 9a5c675

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/uu/yes/src/yes.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
2727

2828
match exec(&buffer) {
2929
Ok(()) => Ok(()),
30+
// On Windows, silently handle broken pipe since there's no SIGPIPE
31+
#[cfg(windows)]
3032
Err(err) if err.kind() == io::ErrorKind::BrokenPipe => Ok(()),
3133
Err(err) => Err(USimpleError::new(
3234
1,

0 commit comments

Comments
 (0)