Skip to content

Commit 3609c60

Browse files
committed
refactor(usage_md): return ExitCode instead of calling process::exit
https://claude.ai/code/session_01TSnvxN1HBwwzhxfFShWAQ5
1 parent cd2a9fa commit 3609c60

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

cli/usage_md.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
use parallel_disk_usage::usage_md::render_usage_md;
2+
use std::process::ExitCode;
23

3-
fn main() {
4+
fn main() -> ExitCode {
45
match render_usage_md() {
5-
Ok(content) => println!("{}", content.trim_end()),
6+
Ok(content) => {
7+
println!("{}", content.trim_end());
8+
ExitCode::SUCCESS
9+
}
610
Err(error) => {
711
eprintln!("error: {error}");
8-
std::process::exit(1);
12+
ExitCode::FAILURE
913
}
1014
}
1115
}

0 commit comments

Comments
 (0)