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 autoupdateis 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
headas arevYou’ll need to make sure that the remote repository
myrepo/myrepohas a.pre-commit-hooks.yamlwith the proper metadata in a.pre-commit-hooks.yamlThe subtlety is:
.pre-commit-config.yaml.pre-commit-hooks.yamlThe
pre-commit autoupdatecommand did not work for me.However,
pre-commit cleancommand 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 autoupdateresolves this)@sheeeng that would probably imply you’re using an unsupported workflow – generally
pre-commit cleanshould be unnecessaryChecking in
.pre-commit-config.yamlis suggested. The “remote” repositories are if you want to share that hook definition with multiple consuming repositories