use std::{io::Write, process::ExitCode};
#[tokio::main(flavor = "current_thread")]
async fn main() -> ExitCode {
match cp_cli::run().await {
Ok(()) => ExitCode::SUCCESS,
Err(error) if error.is_broken_pipe() => ExitCode::SUCCESS,
Err(error) => {
let _ = writeln!(std::io::stderr().lock(), "error: {error}");
ExitCode::FAILURE
}
}
}