mirror of
https://github.com/uutils/coreutils
synced 2024-10-07 16:39:26 +00: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:
parent
816c55dce4
commit
b87387964d
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue