26B / php-pre-commit

Pre-commit git hook to help keep code within PHP standards.
MIT License
7 stars 1 forks source link

Error when `.git/` doesn't exist #7

Closed xipasduarte closed 2 years ago

xipasduarte commented 2 years ago

When the folder doesn't exist we shouldn't run the commands and leave gracefully with a warning.

cp: cannot stat '/home/runner/work/gulbenkian-checkout/gulbenkian-checkout/vendor/26b/php-pre-commit/../26b/php-pre-commit/pre-commit': No such file or directory
chmod: cannot access '/home/runner/work/gulbenkian-checkout/gulbenkian-checkout/.git/hooks/pre-commit': No such file or directory
Script php-pre-commit handling the post-install-cmd event returned with error code 1