tarmolov / git-hooks-js

A tool to manage and run project git hooks
167 stars 30 forks source link

Existence of subfolders follows to error #40

Closed seth2810 closed 7 years ago

seth2810 commented 7 years ago

Currently if some subfolder (for storing something helpful) exists inside hook folder, it will be interpreted and executed as hook leading to that hook will be failed:

$ mkdir -p .githooks/pre-rebase/test
$ .git/hooks/pre-rebase             
[GIT-HOOKS ERROR] Cannot execute hook: <project_dir>/.githooks/pre-rebase/test. Please check file permissions.

I think that would be great if result of readDirSync will be filtered before running hook.