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

.git/hooks/pre-commit is not +x on Unix systems #88

Closed mcollina closed 7 years ago

mcollina commented 7 years ago

https://github.com/observing/pre-commit/commit/a9c973224a299a03aef66b5fd1a3b5d566edfee6#diff-f16acefe4b6553580c43edab685f50f3 creates a file that does not have +x set on Unix systems, making it not executable.

elclanrs commented 7 years ago

Same here, I need to run chmod a+x .git/hooks/pre-commit...

mcollina commented 7 years ago

Thanks so much @3rd-Eden!!!!!

dwightjack commented 7 years ago

Hi,

having the same issue with v1.2.1.

I'm on a Mac with node v6.9.1 (nvm) and npm v3.10.9. The hook file is created with -r----x--t. Any hint on how to solve it?

Thanks!

josegal commented 7 years ago

Hi -- I the fix wasn't quite right -- that -r----x--t happens when 777 is interpreted as decimal instead of octal. I have just pushed https://github.com/observing/pre-commit/pull/90 to fix this

dwightjack commented 7 years ago

Thanks! :)

3rd-Eden commented 7 years ago

Published 1.2.2 with #90 hopefully that will unfuck my fuckups.

dwightjack commented 7 years ago

I tested it and now works flawlessly.

Thank you!