diff --git a/pre-push.sh b/pre-push.sh index 3db4291..1a9b5c5 100755 --- a/pre-push.sh +++ b/pre-push.sh @@ -1,10 +1,10 @@ params="--bootstrap vendor/autoload.php tests --testdox --color" -if [ $(command -v phpunit) ]; then - phpunit $params +if [ -d ./vendor/phpunit ]; then + ./vendor/phpunit/phpunit/phpunit $params else - if [ -d ./vendor/phpunit ]; then - ./vendor/phpunit/phpunit/phpunit $params + if [ $(command -v phpunit) ]; then + phpunit $params else echo "Please, run 'make install' or install phpunit globally to run the tests" fi