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
pre-commit autoupdate yields "PermissionError: [WinError 32]" #2046
Comments
do you have some sort of virus scanner? or do you have that directory open in some other program? |
I'd say no to both. Ad virus scanner: Nothing custom, just what is on Windows 10 by default ("Virus & threat protection" in the settings). No reports of blocked access there. Ad directory open in some other program: Happens even when I completely remove the |
the error doesn't really have anything to do with the pre-commit cache -- it's creating a temporary directory in your tempdir and then cleaning it up when it is done. there must be some other program running on your machine which notices that directory and holds onto it for some reason -- maybe you could inspect what programs are accessing that directory? |
You are right! Using "Resource Manager" I was able to spot solely |
perhaps try using |
Thanks for the link - nice utility. It basically gives me the same list as "Resource Manager", but running it in the correct moment reveals the following:
So it seems to be just pre-commit? (does it call git in the background - or is this the culprit??) |
it calls |
what |
Removing that setting during a reinstall fixed the issue. Thank you for the - very quick - support! Not sure if this is something that has to be fixed here - as the feature is experimental, I think it is rather on |
I wonder if there's a way to disable it for specific repositories -- that definitely seems like it'll be problematic if it's turned on for everything |
To me it seems like a yes: From https://newreleases.io/project/github/git-for-windows/git/release/v2.31.0.windows.1 :
So I assume adding those config settings on a repo level with |
describe your issue
Whenever I try to do an autoupdate of the pre-commit config, I get the following error. I tried to reinstall pre-commit, wipe the venv dir, upgrade pip etc. Running on Win10 and Python 3.9.6 - it has been working since recently, but I can not recall any substantial change on the system that might cause this behavior. Interestingly installing the hooks works fine.
Really no idea what causes this and how to fix it. Did I miss something?
pre-commit --version
pre-commit 2.15.0
.pre-commit-config.yaml
~/.cache/pre-commit/pre-commit.log (if present)
version information
error information
The text was updated successfully, but these errors were encountered: