We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63782b6 commit 0e0b5daCopy full SHA for 0e0b5da
src/main.rs
@@ -9,6 +9,7 @@ use std::{
9
io::{self, IsTerminal},
10
net::{SocketAddr, ToSocketAddrs},
11
path::PathBuf,
12
+ process::ExitCode,
13
str::FromStr,
14
sync::atomic::{AtomicBool, Ordering},
15
};
@@ -217,16 +218,16 @@ fn main_wrapper() -> Result<()> {
217
218
last_error.map_or(Ok(()), Err)
219
}
220
-fn main() {
221
+fn main() -> ExitCode {
222
match main_wrapper() {
- Ok(_) => {}
223
+ Ok(_) => ExitCode::SUCCESS,
224
Err(e) => {
225
if LOGGING_INITIALIZED.load(Ordering::SeqCst) {
226
error!("{e}");
227
} else {
228
eprintln!("{e}");
229
- std::process::exit(1);
230
+ ExitCode::FAILURE
231
232
233
0 commit comments