main: ensure patches are written with a trailing newline

This commit is contained in:
Fabio Valentini 2023-10-03 22:38:29 +02:00
parent 4a9a7bd4a5
commit bf53a783b6
No known key found for this signature in database
GPG key ID: 5AC5F572E5D410AF

View file

@ -172,7 +172,7 @@ def main():
for fname, diff in zip(patch_files, diffs):
if fname and diff:
print(f"# {fname}")
print("\n".join(diff))
print("\n".join(diff) + "\n")
else:
with open(spec_file, "w") as fobj:
fobj.write(spec_contents)
@ -180,7 +180,7 @@ def main():
for fname, diff in zip(patch_files, diffs):
if fname and diff:
with open(fname, "w") as fobj:
fobj.write("\n".join(diff))
fobj.write("\n".join(diff) + "\n")
log.success(f"Generated: {fobj.name}")