Update the diff program to use exit code 1 for non-matching diff.
This commit is contained in:
@@ -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>(
|
||||
|
||||
Reference in New Issue
Block a user