Closed JamesMcGuigan closed 8 years ago
Example error message is:
git-hooks unable to execute file: /Users/jamie/Edgefolio/source/webapps/.githooks/pre-commit/npm-shrinkwrap.sh with permissions: 644 is the file executable?
I cannot approve the pr because of the following issues:
.idea
in .gitignore
is unnecessary. You have to ignore it in your user .gitignore
.git-hooks
shouldn't catch errors because it is hook-template.js
job.I took advantage of your pr and fixed the issue. Thank you!
1.0.1
One of the common getting started errors is non-executable permissions on the hook script files. I have added a user friendly try/catch error message to hint at this possible problem. I have not tested this on windows, and I have not done an exhaustive list of all the reasons child_process.spawn() might throw an exception, assuming a permissions issue is the primary cause.
This however is a much less obscure error message than:
Cannot find git-hooks. Did you install it?
https://github.com/tarmolov/git-hooks-js/issues/6