mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
core: mute all BrokenPipe errors
On windows the error message does not contain `Broken pipe`, so let's try to find the error `kind` which should be `BrokenPipe` in all cases.
This commit is contained in:
@@ -8,7 +8,7 @@ pub fn mute_sigpipe_panic() {
|
||||
let hook = panic::take_hook();
|
||||
panic::set_hook(Box::new(move |info| {
|
||||
if let Some(res) = info.payload().downcast_ref::<String>() {
|
||||
if res.contains("Broken pipe") {
|
||||
if res.contains("BrokenPipe") {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user