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 Oct 10, 2021
1 parent c86dde9 commit 9c4cad5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
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 9c4cad5

Please sign in to comment.