Skip to content

Commit 5dd4129

Browse files
committed
fix: fix format always exiting with error
1 parent 39a8312 commit 5dd4129

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/oxvg/src/commands/format.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ impl RunCommand for Format {
9393
Ok(())
9494
},
9595
);
96-
error.store(true, Ordering::Relaxed);
96+
if matches!(result, Err(_) | Ok(Err(_))) {
97+
error.store(true, Ordering::Relaxed);
98+
}
9799
match result {
98100
Err(err) => eprintln!("{err}"),
99101
Ok(Err(err)) => eprintln!("{err}"),

0 commit comments

Comments
 (0)