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

Drop the input before writing to the output #813

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Xophmeister
Copy link
Member

Drop the input before writing to the output

Resolves issue: #812

Description

When Topiary tries to write its output in place, it does so by writing to a temporary file that is then moved to the same location as the input file when it's complete (known as "persisting"). The hypothesis is that Windows opens an exclusive lock on the input file and therefore this process fails.

This PR causes all references to the open input file to be dropped -- and hence the file handler closed -- before persistence.

Caution

Untested! Do not merge until verified...

Checklist

Checklist before merging:

  • CHANGELOG.md updated
  • README.md up-to-date

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.

1 participant