PHPStorm isn't running my git pre-commit hook

Any idea how to get them working?  On command line I can't commit bad code yet the PHPStorm GUI commits OK.

1 comment
Comment actions Permalink

OK So now it's seems to have started running the pre-commit when I commit, not sure how or why it started to.

It is now failing the tests but unfortunately there was no way of telling what happened because you can't see the output anywhere.  So to get round that I added

exec > $logfile 2>&1

to the top of my pre-commit hook.  I was able to see that the issue is path to php related.

I added

export PATH=/usr/local/bin:/opt/local/bin:/opt/local/sbin:/usr/local/Cellar/ruby/2.1.2/bin:$PATH

now it can see my homebrew php binary and all seems to be working.

What would be really helpful is if the pre-hook script output could be directed to the phpstorm console or messages tab.  Is that possible?


Please sign in to leave a comment.