Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a fix for mangling longer CHANGELOGs #17

Merged
merged 2 commits into from
Sep 19, 2022

Conversation

mattwynne
Copy link
Member

@mattwynne mattwynne commented Sep 19, 2022

🤔 What's changed?

This reads the whole file in and closes it before attempting to open the file for writing, thereby avoiding the situation where we start writing to the file (and truncating it) before we've read it in, or overwrite the existing file and leave old bytes at the end.

⚡️ What's your motivation?

Fix #9

🏷️ What kind of change is this?

  • 🐛 Bug fix (non-breaking change which fixes a defect)

♻️ Anything particular you want feedback on?

There are no tests for this because the code in root.go is not (yet!) tested. I've tested it manually.

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

This text was originally generated from a template, then edited by hand. You can modify the template here.

This reads the whole file in and closes it before attempting to open
the file for writing, thereby avoiding the situation where we start
writing to the file (and truncating it) before we've read it in, or
overwrite the existing file and leave old bytes at the end.

There are no tests for this because the code in root.go is not (yet!)
tested. I've tested it manually.

Co-authored-by: Carl Menezes <[email protected]>
@mattwynne mattwynne temporarily deployed to Release September 19, 2022 22:03 Inactive
@mattwynne mattwynne temporarily deployed to Release September 19, 2022 22:04 Inactive
@mattwynne mattwynne merged commit e4ae558 into main Sep 19, 2022
@mattwynne mattwynne deleted the no-more-mangling-anchor-links branch September 19, 2022 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Additional reference links are mangled by changelog release
1 participant