-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Temporary repo context directory cannot be cleaned up on Windows #156
Comments
Seems to work fine for me on windows -- do you have a specific reproduction or error (your issue does not contain one)?
|
If I execute your example, I get
Only differences: I'm on Python 3.6.8 and cloning using SSH. |
https://bugs.python.org/issue26660 and python/cpython#10320: Seems this was fixed in Python 3.8? |
3.8b1 it looks like, yes -- I recommend upgrading! |
Also, it may not help right away but FWIW, things should improve further in Python 3.10 for the remaining cases of OS-level removal problems that python/cpython#10320 cannot avoid (in-use files, transient errors, I/O failures, etc). Assuming python/cpython#24793 lands, you'll be able to explicitly pass |
does the issue persist if you use all-repos/all_repos/autofix_lib.py Lines 122 to 129 in 8f2e9bf
|
On Windows all files in
.git/
dir are marked as read-only. On Windows, that means that they cannot be deleted by thetempfile.TemporaryDirectory
context manager ("Access is denied").One explicit way to fix this is to do something like this on every file in
.git/
prior to exiting the temp dir context manager:See also https://gitpython.readthedocs.io/en/stable/reference.html?highlight=rmtree#git.util.rmtree for implementation.
The text was updated successfully, but these errors were encountered: