From bf53a783b648e5a51a2d5f2070efa2d59079c8dc Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Tue, 3 Oct 2023 22:38:29 +0200 Subject: [PATCH] main: ensure patches are written with a trailing newline --- rust2rpm/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust2rpm/__main__.py b/rust2rpm/__main__.py index a3bc846..a002fc6 100644 --- a/rust2rpm/__main__.py +++ b/rust2rpm/__main__.py @@ -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}")