Skip to content

Commit

Permalink
docs: update "hooks not running" section
Browse files Browse the repository at this point in the history
  • Loading branch information
typicode authored and nikoladavitkovski committed Sep 5, 2022
1 parent 7c36e31 commit e933f0c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions docs/README.md
Expand Up @@ -368,11 +368,10 @@ export NVM_DIR="$HOME/.nvm"

## Hooks not running

Ensure that you don't have a typo in your filename. For example, `precommit` or `pre-commit.sh` are invalid names. See Git hooks [documentation](https://git-scm.com/docs/githooks) for valid names.

Verify hooks permissions, they should be executable. This is automatically set when using `husky add` command but you can run `chmod +x .husky/<hookname>` to fix that.

Check that your version of Git is greater than `2.9`.
1. Ensure that you don't have a typo in your filename. For example, `precommit` or `pre-commit.sh` are invalid names. See Git hooks [documentation](https://git-scm.com/docs/githooks) for valid names.
1. Check that `git config core.hooksPath` returns `.husky` (or your custom hooks directory).
1. Verify that hook files are executable. This is automatically set when using `husky add` command but you can run `chmod +x .husky/<hookname>` to fix that.
1. Check that your version of Git is greater than `2.9`.

## Yarn on Windows

Expand Down

0 comments on commit e933f0c

Please sign in to comment.