diff --git a/pre-commit b/pre-commit index 60d6877..317b5bf 100755 --- a/pre-commit +++ b/pre-commit @@ -1,7 +1,7 @@ #!/bin/sh set -e -if git diff --cached --name-only | grep -E '.(js|json)$'; then +if [ "$(dirname "$0")" != ".git/hooks" ] || git diff --cached --name-only | grep -E '.(js|json)$'; then yarn install yarn run package exec git add dist/index.js