Its my first time using pre-commit today.
I first installed it using brew install pre-commit on my macbook.
pre-commit --version
pre-commit 1.18.3
Then in my repo I have a file (created and committed) .pre-commit-hooks.yaml whose contents are
- id: trailing-whitespace
name: Trim Trailing Whitespace
entry: trailing-whitespace-fixer
And then I create a file .pre-commit-config.yaml whose contents are
repos:
- repo:<URL>/test-repo
rev: master
hooks:
- id: trailing-whitespace
When I run pre-commit run -a, I get the Error
pre_commit.clientlib.InvalidManifestError:
=====> /Users/yser/.cache/pre-commit/repo08_hn1ux/.pre-commit-hooks.yaml does not exist
Would you know what this happens ?
probably because you're using unsupported master and are being confused by the cache? it probably "fixes" itself by using pre-commit clean but you shouldn't be using mutable references to begin with (prefer tags / sha revisions)
@asottile Thanks for your suggestion. pre-commit clean worked for me like a charm. It worked with the master tag. But since its something that is not recommended, ill revert to tag/SHA.
cheers -- thanks for the issue :tada:
Most helpful comment
@asottile Thanks for your suggestion.
pre-commit cleanworked for me like a charm. It worked with themastertag. But since its something that is not recommended, ill revert to tag/SHA.