Skip to content

pre-commit install-hooks not installing hadolint binary #886

@jamesbraza

Description

@jamesbraza
  • This is a bug report
  • This is a feature request
  • I searched existing issues before opening this one

Expected behavior

I added the following to my .pre-commit-config.yaml per INTEGRATION.md docs:

  - repo: https://github.com/hadolint/hadolint
    rev: v2.10.0
    hooks:
      - id: hadolint

I then ran pre-commit install-hooks and expect it to work.

[INFO] Initializing environment for https://github.com/psf/black.
[INFO] Initializing environment for https://github.com/hadolint/hadolint.
[INFO] Installing environment for https://github.com/psf/black.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...

Note that hadolint doesn't show up as being set up.

Actual behavior

When running pre-commit:

Lint Dockerfiles..............................................................Failed
- hook id: hadolint
- exit code: 1

Executable `hadolint` not found

I would expect pre-commit install-hooks to install the hadolint binary.

Steps to reproduce the behavior

Documented above, I just:

  1. Added the pre-commit section to .pre-commit-config.yaml
  2. Ran pre-commit install-hooks

Additional environment details (OS, stack version, etc.)

macOS Big Sur v11.5.1. Though I don't want to brew install hadolint, I would like pre-commit to encapsulate it as it does every other hook.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions