Update the diff program to use exit code 1 for non-matching diff.

This commit is contained in:
Tom Alexander
2023-04-12 14:50:56 -04:00
parent 05c9ec86b8
commit 1a38ca43d6
10 changed files with 24 additions and 756 deletions

View File

@@ -54,6 +54,13 @@ impl DiffResult {
.iter()
.any(|child| child.status == DiffStatus::Bad || child.has_bad_children())
}
pub fn is_bad(&self) -> bool {
match self.status {
DiffStatus::Good => !self.has_bad_children(),
DiffStatus::Bad => true,
}
}
}
pub fn compare_document<'s>(