gruntwork-io / pre-commit

A collection of pre-commit hooks used by Gruntwork tools
https://gruntwork.io/
Apache License 2.0
494 stars 157 forks source link

Pathspec '0.1.10' did not match any files known to git #36

Closed twigs67 closed 4 years ago

twigs67 commented 4 years ago

Hello,

I'm receiving the following error:

MacBook-Pro$ pre-commit run terraform-fmt --all-files
[INFO] Initializing environment for https://github.com/gruntwork-io/pre-commit.
An unexpected error has occurred: CalledProcessError: command: ('/usr/local/bin/git', 'checkout', '0.1.10')
return code: 1
expected return code: 0
stdout: (none)
stderr:
    error: pathspec '0.1.10' did not match any file(s) known to git.

My yaml:

# This configuration file allows our pre-commit hooks to be used with pre-commit: http://pre-commit.com/
repos:
  -   repo: https://github.com/pre-commit/pre-commit-hooks
      rev: v2.3.0
      hooks:
        -   id: check-yaml
        -   id: end-of-file-fixer
        -   id: trailing-whitespace
  -   repo: https://github.com/psf/black
      rev: 19.3b0
      hooks:
        -   id: black
  - repo: https://github.com/gruntwork-io/pre-commit
    rev: "0.1.10" # Get the latest from: https://github.com/gruntwork-io/pre-commit/releases
    hooks:
      - id: terraform-fmt
      - id: terraform-validate
      - id: tflint
      - id: shellcheck
      - id: gofmt
      - id: golint
twigs67 commented 4 years ago

Please disregard, adding "v0.1.10" did the trick.