syntaqx / git-hooks

A collection of git hooks for use with pre-commit
MIT License
34 stars 17 forks source link

Executable `circleci-config-validate.sh` not found #1

Closed ellisvalentiner closed 5 years ago

ellisvalentiner commented 5 years ago

Running pre-commit fails because the shell script isn't found:

$ pre-commit run --all-files                      
black....................................................................Passed
Flake8...................................................................Passed
bandit...................................................................Passed
safety...................................................................Passed
CircleCI config validation...............................................Failed
hookid: circleci-config-validate

Executable `/Users/<redacted>/.cache/pre-commit/repo5_0lcvu4/hooks/circleci-config-validate.sh` not found
syntaqx commented 5 years ago

Hey there. Been sick, but I'll check this out in a couple days once I'm back on my feet!

syntaqx commented 5 years ago

@ellisvalentiner Which version of this project are you using? I just created a new repository, added a .circleci/config.yml, and the following .pre-commit-config.yaml:

- repo: https://github.com/syntaqx/git-hooks
  rev: v0.0.6
  hooks:
    - id: circleci-config-validate

And:

$ pre-commit run --all-files
CircleCI config validation...............................................Passed

Could you give me more exact steps to reproduce? Perhaps ensuring you're also using the latest version of pre-commit, etc?

ellisvalentiner commented 5 years ago

Thanks for the response.

Here is my .pre-commit-config.yaml:

repos:
-   repo: https://github.com/ambv/black
    rev: 19.3b0
    hooks:
    - id: black
-   repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v2.1.0
    hooks:
    - id: flake8
-   repo: https://github.com/PyCQA/bandit
    rev: 2a1dbab
    hooks:
    - id: bandit
-   repo: https://github.com/Lucas-C/pre-commit-hooks-safety
    sha: v1.1.0
    hooks:
    - id: python-safety-dependencies-check
-   repo: https://github.com/syntaqx/git-hooks
    rev: v0.0.6
    hooks:
    - id: circleci-config-validate

I've ran pre-commit autoupdate as well.

syntaqx commented 5 years ago

Can you upgrade to 0.0.7 and try with that? I think I figured out the issue.

ellisvalentiner commented 5 years ago

Seems good to me. I didn't do any thorough testing but it seems to work with my particular CircleCI config file.

syntaqx commented 5 years ago

Great! I'll close as resolved then for the time being. Let me know if you need anything else!