@ -510,6 +510,7 @@ name = "xash3d-query"
version = "0.1.0"
dependencies = [
"getopts",
"libc",
"serde",
"serde_json",
"termion",
@ -11,6 +11,7 @@ default = ["color"]
color = ["termion"]
[dependencies]
libc = "0.2.148"
thiserror = "1.0.49"
getopts = "0.2.21"
serde = { version = "1.0.188", features = ["derive"] }
@ -558,6 +558,11 @@ fn execute(cli: Cli) -> Result<(), Error> {
fn main() {
let cli = cli::parse();
// suppress broken pipe error
unsafe {
libc::signal(libc::SIGPIPE, libc::SIG_DFL);
}
if let Err(e) = execute(cli) {
eprintln!("error: {}", e);
process::exit(1);