Skip to content

Commit 829b2e9

Browse files
Fix pre-commit hook
1 parent 416d508 commit 829b2e9

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

git-hooks/pre-commit

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,14 @@
44
exec 1>&2
55

66
ROOT="$PWD"
7-
PHP_CS_FIXER="${ROOT}/vendor/bin/php-cs-fixer"
7+
PHP_CS_FIXER="${ROOT}/bin/php vendor/bin/php-cs-fixer"
88
PHP_CS_CONFIG="${ROOT}/.php_cs"
99

1010
if [ ! -f "$PHP_CS_CONFIG" ]; then
1111
echo "Please run 'git commit' from the root directory of the project"
1212
exit 1
1313
fi
1414

15-
if [ ! -x "$PHP_CS_FIXER" ]; then
16-
echo "Please run 'composer install' first"
17-
exit 1
18-
fi
19-
2015
git status --porcelain | grep -e '^[AM]\(.*\).php$' | cut -c 3- | while read line; do
2116
$PHP_CS_FIXER fix --config=$PHP_CS_CONFIG --verbose "$line";
2217
git add "$line";

0 commit comments

Comments
 (0)