refactor(exit): use std::process::exit explicitly (#84)

This commit is contained in:
Alexandre Pasmantier 2024-11-27 23:07:02 +01:00 committed by GitHub
parent d3c16af4e9
commit 30f1940815
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,5 @@
use std::io::{stdout, IsTerminal, Write};
use std::process::exit;
use clap::Parser;
use cli::PostProcessedCli;
@ -57,11 +58,11 @@ async fn main() -> Result<()> {
if let Some(entry) = output.selected_entry {
writeln!(stdout(), "{}", entry.stdout_repr())?;
}
Ok(())
exit(0);
}
Err(err) => {
println!("{err:?}");
return Ok(());
exit(1);
}
}
}