Skip to content

Commit 268e5ab

Browse files
committed
Print actionable error message when --check finds stale files
Previously both update-sig-tables.py and update-community-members.py silently exited with code 1 when run in --check mode and the generated file was out of date, making CI failures hard to diagnose. Now they print a clear message to stderr naming the file and the remediation command ('make generate'). Signed-off-by: immanuwell <pchpr.00@list.ru>
1 parent 4bb961f commit 268e5ab

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

scripts/update-community-members.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ def splice(content, start_marker, end_marker, body):
6666
if original == result:
6767
sys.exit(0)
6868
else:
69+
print(f"{MARKDOWN_FILE} is out of date. Run 'make generate' to update it.", file=sys.stderr)
6970
sys.exit(1)
7071
else:
7172
with open(MARKDOWN_FILE, "w", encoding="utf-8") as f:

scripts/update-sig-tables.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ def render_group(group_name, sigs, show_sponsors):
171171
if original == result:
172172
sys.exit(0)
173173
else:
174+
print(f"{markdown_file} is out of date. Run 'make generate' to update it.", file=sys.stderr)
174175
sys.exit(1)
175176
else:
176177
with open(markdown_file, "w", encoding="utf-8") as f:

0 commit comments

Comments
 (0)