You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since I don't want to fork I suggest the following patch as a fix:
Index: bumpversion/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- bumpversion/__init__.py (date 1435260711000)
+++ bumpversion/__init__.py (date 1522533107000)
@@ -860,7 +860,7 @@
if write_to_config_file:
with io.open(config_file, 'wb') as f:
- f.write(new_config.getvalue().encode('utf-8'))
+ f.write((new_config.getvalue().strip()+'\n').encode('utf-8'))
except UnicodeEncodeError:
warnings.warn(
It just strips and appends a single newline at the end of the file, perhaps a better solution would be checking at the _write_sectionmethod of the RawConfigParser class, but this does the trick.
Whenever you bump the .bumpversion.cfg file ends up with 2 newlines at the end
The text was updated successfully, but these errors were encountered: