Closed guykisel closed 1 year ago
Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:
Thanks, and sorry for taking so long to respond. https://github.com/executablebooks/mdformat/pull/409 fixes this and a couple other issues.
oh, thank you! <3
Describe the bug
context I'm running mdformat on a directory of markdown docs in a perforce repo. In perforce, everything in a repo defaults to read-only, and only becomes writeable when checked out. Normally this should be fine, because I'm running mdformat on files I've checked out. However, the atomic_write function creates a temp dir in the current path, which in this case is not writeable unless I've explicitly checked it out.
expectation I expect atomic_write to fall back to creating the temp dir in one of the default paths used by
tempfile.gettempdir()
as described at https://docs.python.org/3/library/tempfile.html#tempfile.gettempdir or perhaps alternatively to give up on atomic writes and just do a best-effort?bug atomic_write fails with a permission error :(
problem This makes using mdformat with perforce slightly more difficult. It's not a blocker, just mildly annoying.
Reproduce the bug
List your environment
Python 3.9.1