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
Invalid Cross-device Link #38
Comments
This has something to do with atomicwites which is used by fpyutils in the write operation. See this comment in atomicwites documentation:
Does this happen occasionally, for example when the readme file changed or is it totally random? |
That sounds like the right idea, yeah. Indeed, it most recently happened when I modified the README within WSL on the Windows file system. I have seen it before, most likely in the same scenario, but it’s been too long for me to be sure. |
This issue should be fixed with version 8.1.7 since atomicwrites is no longer a dependency of fpyutils. I don't have Windows so I can't test this |
Hello @frnmst ,
And it also failed locally on my fedora 36
|
Interesting. I'll try with Fedora to see if I can reproduce the bug and maybe change |
OK, I did a quick test: I installed Fedora Workstation 36 and indeed the problem shows up immediately, even if I install md-toc from source. I can see that a real difference is the Python version (3.11 vs 3.9 on Debian). Changing |
- Use of flush and shutil.move instead of os.replace. See frnmst/md-toc#38
Tested the latest md-toc (8.1.8) on Fedora and Arch Linux. The exception did not appear anymore during testing. Please update to the latest versions of md-toc and fpyutils. |
I hope this issue is finally solved so I'm going to close it |
The pre-commit hook sometimes crashes when run from the Windows file system within Windows Subsystem for Linux (WSL):
I am not yet certain under what circumstances this issue occurs; if it's happening to others I suggest starting by re-running the hook.
The text was updated successfully, but these errors were encountered: