Skip to content

Commit

Permalink
fix exit code (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
yito88 authored Feb 25, 2025
1 parent 976469c commit 1f091c0
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions workload/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,18 @@ use tracing_subscriber::EnvFilter;

#[tokio::main]
async fn main() {
let exit_code = inner_main().await;
let code = inner_main().await;

exit_code.output_logs();
code.output_logs();

exit_code.assert();
code.assert();

std::process::exit(exit_code.code());
if code.is_fatal() {
std::process::exit(code.code());
} else {
// system state is as expected
std::process::exit(0);
}
}

async fn inner_main() -> Code {
Expand Down

0 comments on commit 1f091c0

Please sign in to comment.