diff --git a/src/setup.sh b/src/setup.sh index f5aa8d8..77bc3da 100644 --- a/src/setup.sh +++ b/src/setup.sh @@ -7,7 +7,11 @@ else PRE_COMMIT_EXISTS=0 fi -cp ./vendor/wickedreports/phpcs-pre-commit-hook/src/pre-commit .git/hooks/pre-commit +if [ ! -d .git/hooks ]; then + mkdir -p .git/hooks +fi + +cp ./vendor/wickedreports/phpcs-git-pre-commit/src/pre-commit .git/hooks/pre-commit chmod +x .git/hooks/pre-commit if [ "$PRE_COMMIT_EXISTS" = 0 ]; @@ -15,4 +19,4 @@ then echo "Pre-commit git hook is installed!" else echo "Pre-commit git hook is updated!" -fi \ No newline at end of file +fi