Print a useful message when the file is out of date

Don't print the differences: interested users can just run `git diff` (or
save the old file and run `comm`).

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine
2026-01-02 22:23:28 +01:00
parent 93ef003cdc
commit b6c30c3639

View File

@@ -35,7 +35,11 @@ def main():
data.update_shadow_file(args.always_update)
else:
up_to_date = True
up_to_date &= data.compare_shadow_file_verbosely()
if not data.is_shadow_file_up_to_date():
print(f'{data.shadow_file_path()} is out of date')
print(f'After adding or removing a conifg option, you need to run')
print(f'{sys.argv[0]} and commit the result.')
up_to_date = False
sys.exit(0 if up_to_date else 1)
if __name__ == "__main__":