observing / pre-commit

Automatically installs a git pre-commit script in your git repository which runs your `npm test` on pre-commit
MIT License
1.88k stars 153 forks source link

make it compatible with yarn pnp #157

Open tibz7 opened 2 years ago

tibz7 commented 2 years ago

yarn plug and play does not use the node_modules directory: therefore

#!/bin/bash
./node_modules/pre-commit/hook
RESULT=$?
[ $RESULT -ne 0 ] && exit 1
exit 0

is not working.

it outputs this .git/hooks/pre-commit: line 2: ./node_modules/pre-commit/hook: No such file or directory