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 152 forks source link

No 777 on `hook` leads to commit failed #113

Open weimengxi opened 7 years ago

weimengxi commented 7 years ago

the default access mode of node_modules/pre-commit/hook file is -rw-r--r-- , and when i exec commit operation, it just show me one line of message , which is:

error message
.git/hooks/pre-commit: line 2: ./node_modules/pre-commit/hook: Permission denied

image

I've tried exec change mode of the node_modules/pre-commit/hook file to 777 roughly。 Fortunately, it WORKS。 However, i don't think it's the right way to fix this problem.