Skip to content

Commit

Permalink
Fix for line terminators on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mosteo committed Jan 16, 2024
1 parent 4ad0a4a commit 6b6caec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/version-patcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6b6caec

Please sign in to comment.