sds / overcommit

A fully configurable and extendable Git hook manager
MIT License
3.92k stars 281 forks source link

permissions / no-permissions deadlock #768

Closed andreheijstek closed 2 years ago

andreheijstek commented 2 years ago

I am trying to add a custom hook to overcommit using:

CustomScript:
enabled: true
required_executable: "./.git-hook/i18n-missing"

The .git-hook directory is in my PATH. If the i18n-missing file has no execute permissions, I get the following error: './.git-hook/i18n-missing' is not installed, not in your PATH, or does not have execute permissions If I give it execute permissions, I get: File .git-hook/i18n-missing has unnecessary execute permissions

How to escape from this?

sds commented 2 years ago

Apologies for the delay in response.

Simply add the file to be ignored by the ExecutePermissions check:

.overcommit.yml

  ExecutePermissions:
    enabled: true
    exclude: './.git-hook/i18n-missing'

...or similar.

Hope that helps.