Actually fail if --check fails

Return a nonzero status if called with `--check` and the check finds some
problems.

Fixes #244.

Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
Gilles Peskine
2026-01-07 19:24:20 +01:00
parent b8d3b81597
commit feef17dcf3
+1
View File
@@ -242,6 +242,7 @@ def check_generated_files(generation_scripts: List[GenerationScript],
# there's nothing to compare to, or clean up.
continue
if not filecmp.cmp(file, bak_file):
ok = False
ref_file = file.with_name(file.name + ".ref")
ref_file = root / ref_file
if ref_file.exists():