mirror of
https://github.com/rustic-rs/rustic.git
synced 2025-10-26 11:18:51 +00:00
fix broken pipe panic
This commit is contained in:
parent
222cb38c35
commit
b60d28478b
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -1732,6 +1732,7 @@ dependencies = [
|
||||
"integer-sqrt",
|
||||
"itertools",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
"log",
|
||||
"merge",
|
||||
"nix",
|
||||
|
||||
@ -86,6 +86,7 @@ users = "0.11"
|
||||
itertools = "0.10"
|
||||
simplelog = "0.12"
|
||||
comfy-table = "6.1.2"
|
||||
libc="0.2"
|
||||
|
||||
[dev-dependencies]
|
||||
rstest = "0.15"
|
||||
|
||||
@ -41,5 +41,12 @@ mod index;
|
||||
mod repo;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
// this is a workaround until unix_sigpipe (https://github.com/rust-lang/rust/issues/97889) is available.
|
||||
// See also https://github.com/rust-lang/rust/issues/46016
|
||||
#[allow(unsafe_code)]
|
||||
unsafe {
|
||||
libc::signal(libc::SIGPIPE, libc::SIG_DFL);
|
||||
}
|
||||
|
||||
commands::execute()
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user