Skip to content

pre-commit autoupdate --freeze with oxipng breaks #2250

@gitpushdashf

Description

@gitpushdashf

describe your issue

$ pre-commit autoupdate --freeze
Updating https://github.com/pre-commit/pre-commit-hooks ... already up to date.
Updating https://github.com/editorconfig-checker/editorconfig-checker.python ... already up to date.
...
Updating https://github.com/shssoichiro/oxipng ...
=====> ~/.cache/pre-commit/repo4elreq5n/.pre-commit-hooks.yaml is not a file

I get this only with oxipng. At first, I didn't have cargo, so I did rustup and now I have cargo. Same thing either way. I'm not sure if this is a pre-commit bug or a oxipng bug.

If I comment out the oxipng section in my .pre-commit-config.yaml, it works fine.

The section in my pre-commit-config.yaml is like this:

-   repo: https://github.com/shssoichiro/oxipng
    rev: b234899b5db911d0e5482deffcf4e6364ad349d0  # frozen: v1.1.1
    hooks:
    -   id: oxipng

I know the revision is wrong -- I copied the block from another part of the config and was running autoupdate --freeze to correct it.

Using macOS.

Thank you!

pre-commit --version

2.17.0

.pre-commit-config.yaml

repos:
-   repo: https://github.com/pre-commit/pre-commit-hooks
    rev: 8fe62d14e0b4d7d845a7022c5c2c3ae41bdd3f26  # frozen: v4.1.0
    hooks:
    -   id: check-added-large-files
    -   id: check-json
    -   id: check-toml
    -   id: check-yaml
    -   id: check-case-conflict
-   repo: https://github.com/editorconfig-checker/editorconfig-checker.python
    rev: 97461803b9d2cf5f70323ae0058e3447355c8927  # frozen: 2.4.0
    hooks:
    -   id: editorconfig-checker
-   repo: https://github.com/shssoichiro/oxipng
    rev: b234899b5db911d0e5482deffcf4e6364ad349d0  # frozen: v1.1.1
    hooks:
    -   id: oxipng

~/.cache/pre-commit/pre-commit.log (if present)

This file wasn't updated by this action.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions