Summary
prek auto-update --freeze adds 2 spaces before the # frozen: comment. prettier enforces a single space before inline # comments in yaml, so the subsequent prek run -a reformats the modified lines and reports the run as failed.
Reproduction
prek run -a # passes, prettier formats file with 1 space
prek auto-update --freeze # updates revs, adds 2 spaces before # frozen:
prek run -a # prettier hook rewrites the lines → hook fails
Example output of auto-update --freeze
- repo: https://github.com/rbubley/mirrors-prettier
rev: b25652612a4a3c1da8caccfca9af661db56b2c07 # frozen: v3.8.2
# ^^
Expected
rev: b25652612a4a3c1da8caccfca9af661db56b2c07 # frozen: v3.8.2
Suggested fix
Use a single space when appending the frozen comment.
Summary
prek auto-update --freezeadds 2 spaces before the# frozen:comment.prettierenforces a single space before inline#comments inyaml, so the subsequentprek run -areformats the modified lines and reports the run as failed.Reproduction
Example output of
auto-update --freezeExpected
Suggested fix
Use a single space when appending the frozen comment.