pre-commit: "pre-commit-hooks.yaml does not exist"
Hi guys,
After the last release (0.16.0) we started to facing some issues. The message is:
Updating https://github.com/hootsuite/pre-commit-php.git...[INFO] Initializing environment for https://github.com/hootsuite/pre-commit-php.git.
[INFO] Initializing environment for https://github.com/hootsuite/pre-commit-php.git.
An error has occurred: InvalidManifestError:
=====> /home/rof/.pre-commit/repoB1V3Py/.pre-commit-hooks.yaml does not exist
Check the log at ~/.pre-commit/pre-commit.log"
After force to back to the last version (0.15.4), no more errors found.
Can you give a look on this error?
Thanks!
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 21 (11 by maintainers)
For others getting the same error message,
pre-commit autoupdate
is the usual blanket fix (assuming the upstream repositories are fixed)pre-commit autoupdate did not resolved the error. In fact, running pre-commit autoupdate throws the same error.
that all looks good, though you generally want to avoid
head
as arev
You’ll need to make sure that the remote repository
myrepo/myrepo
has a.pre-commit-hooks.yaml
with the proper metadata in a.pre-commit-hooks.yaml
The subtlety is:
.pre-commit-config.yaml
.pre-commit-hooks.yaml
The
pre-commit autoupdate
command did not work for me.However,
pre-commit clean
command workaround did work.@amr1ta that’s not a good fix as the actual repository is broken, the actual repository should be fixed instead (often
pre-commit autoupdate
resolves this)@sheeeng that would probably imply you’re using an unsupported workflow – generally
pre-commit clean
should be unnecessaryChecking in
.pre-commit-config.yaml
is suggested. The “remote” repositories are if you want to share that hook definition with multiple consuming repositories