If add git hook to pre-commit with following code then you get error "Error!" in PHPStorm.
#!/usr/bin/sh
echo "Error!"
exit 1
But if implement this on PHP you cannot get this error message in PHPStorm.
#!/usr/bin/php
<?php
echo "Error!";
exit(1);
PHPStorm return not understandable error:
error: cannot spawn .git/hooks/pre-commit: No such file or directory
Any ideas how to resolve this problem?
P.S. In command prompt all is ok.
#!/usr/bin/env phpwork better?/bin/env: php: No such file or directory(Windows 7)phpin your%PATH%? try withphp.exeperharps?