make --fix work again

This commit is contained in:
Brian Hicks 2023-05-05 16:20:41 -05:00
parent 02babcedb5
commit 7fdbcf55fb
No known key found for this signature in database
GPG Key ID: C4F324B9CAAB0D50

View File

@ -140,7 +140,11 @@ if __name__ == "__main__":
out.append(content) out.append(content)
if args.fix: if args.fix:
subprocess.run([args.patch_bin, "-p0"], check=True, input=b"\n".join(out)) subprocess.run(
[args.patch_bin, "-p0"],
check=True,
input=b"\n".join(bytes(file) for file in out.files),
)
if not args.fix and out.files: if not args.fix and out.files:
print(f"{len(out.files)} file(s) need fixes! Re-run me with `--fix` or `--review-github-pr` to fix these.") print(f"{len(out.files)} file(s) need fixes! Re-run me with `--fix` or `--review-github-pr` to fix these.")