mirror of
https://github.com/rclone/rclone.git
synced 2025-06-20 11:47:57 +02:00
build: fix check_autogenerated_edits.py flagging up files that didn't exist
Before this change new backend docs would have their changes flagged which is undesirable for the first revision.
This commit is contained in:
parent
210acb42cd
commit
51fd697c7a
@ -77,6 +77,10 @@ def check_file(file):
|
||||
viol = False
|
||||
new_lines = get_file_content("HEAD", file)
|
||||
old_lines = get_file_content("HEAD~1", file)
|
||||
|
||||
# If old file did not exist or was empty then don't check
|
||||
if not old_lines:
|
||||
return
|
||||
|
||||
# Entire autogenerated file check.
|
||||
if any("autogenerated - DO NOT EDIT" in l for l in new_lines[:10]):
|
||||
|
Loading…
x
Reference in New Issue
Block a user