mirror of
https://github.com/numtide/treefmt.git
synced 2024-09-11 17:07:44 +03:00
treat exit status code > 0 as an error
This commit is contained in:
parent
751e598468
commit
ffba2a767d
@ -183,7 +183,14 @@ pub fn run_treefmt(
|
||||
|
||||
match formatter.clone().fmt(&paths) {
|
||||
// FIXME: do we care about the output?
|
||||
Ok(_) => {
|
||||
Ok(out) => {
|
||||
if let Some(scode) = out.status.code() {
|
||||
if scode > 0 {
|
||||
error!("{} failed: exit status {}", &formatter, scode);
|
||||
return (formatter_name.clone(), path_mtime.clone());
|
||||
}
|
||||
}
|
||||
|
||||
info!(
|
||||
"{}: {} files processed in {:.2?}",
|
||||
formatter.name,
|
||||
|
Loading…
Reference in New Issue
Block a user