Open wwomack-bs opened 5 days ago
please try on the latest version and include the backtrace. I suspect this is just Apple's SIP and the particular directory is protected but it's difficult to tell from what you've provided
I believe 4.0.1 is the latest release which is what I am running installed via brew.
This was originally attempted from a directory under my home directory with the same results and a coworker confirmed the same behavior on their machine.
Interestingly, you can see here that with slightly different contents in the same directory, pre-commit is not killed and runs successfully.
➜ /tmp echo "from doesnotexist import nothing" > /tmp/testfile_passes.py
➜ /tmp pre-commit run -V --files /tmp/testfile_passes.py
usage: pre-commit [-h] [-V] {autoupdate,clean,gc,init-templatedir,install,install-hooks,migrate-config,run,sample-config,try-repo,uninstall,validate-config,validate-manifest,help,hook-impl} ...
pre-commit: error: unrecognized arguments: -V
I just pulled down the repo and ran the same using the latest main (cb14bc2) with the same results. There is no stacktrace and pre-commit is immediately killed if passed a file with these contents. Does not seem to matter which directory the file is in.
I guess I should clarify -- I can't reproduce this so I need you to provide a backtrace in order to help debug this. usually when a process is killed you can retrieve a core dump to know how and why it was killed
you mentioned coworker -- I strongly suspect you've got some rogue corporate spyware / antivirus that's overstepping its bounds
search you tried in the issue tracker
killed
describe your issue
I have a single python file that will pass our pre-commit tests when pre-commit is run with
-a
but the process is killed when passed in individually. The file is plain ascii python. I narrowed down the contents to a single import line that still caused the failure. Initially the failure was observed inside my repo but I have recreated it outside the repo which eliminates my pre-commit-config.yaml file as causal.This is on a mac running on a Apple M1 Pro cpu running MacOS 14.6.1.
pre-commit --version
pre-commit 4.0.1
.pre-commit-config.yaml
~/.cache/pre-commit/pre-commit.log (if present)
No response