I\'ve created a very simple pre-commit script:-
#!/usr/bin/env sh
# Run tests
npm test
if [ $? -ne 0 ]; then
echo \"Tests failed. Aborting..\"
exit 1
fi
ex
For me it was that I didn't have a dependency installed that was being called from pre-commit. In my case this was composer
, so a brew install composer
helped me out.
For future peeps, check if you are missing any dependancies being called in your pre-commit file by opening your-project-directory/.git/hooks/pre-commit
in your favorite text editor and install missing the dependancies as needed.