From 6b6caec6e1493f699a02392d9160267eacfd92ea Mon Sep 17 00:00:00 2001 From: "Alejandro R. Mosteo" Date: Tue, 16 Jan 2024 13:19:05 +0100 Subject: [PATCH] Fix for line terminators on Windows --- scripts/version-patcher.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/version-patcher.py b/scripts/version-patcher.py index d10a4682b..70a802438 100644 --- a/scripts/version-patcher.py +++ b/scripts/version-patcher.py @@ -17,6 +17,8 @@ def replace_version(filename, new_text): print(f"WARNING: failed to update version in {filename}") else: with open(filename, 'w') as file: + # Ensure the content has proper line terminators on windows: + new_content = new_content.replace('\n', os.linesep) file.write(new_content) # If a flag exists, skip any updating, just print a message and exit