Skip to content

Commit b222288

Browse files
committed
Fix husky pre-commit hook
1 parent ddcdd0f commit b222288

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

.husky/pre-commit

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
#!/bin/sh
22

3-
set -e # this makes the script fail on first error
3+
set -e
44

5-
chmod +x bin/fix.sh && ./bin/fix.sh
6-
chmod +x bin/lint.sh && ./bin/lint.sh
7-
php artisan test || true
5+
repo_root="$(git rev-parse --show-toplevel)"
6+
cd "$repo_root"
7+
8+
chmod +x bin/fix.sh bin/lint.sh bin/test.sh
9+
./bin/fix.sh
10+
./bin/lint.sh
11+
composer test

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"private": true,
33
"type": "module",
44
"scripts": {
5-
"prepare": "husky"
5+
"prepare": "husky install"
66
},
77
"devDependencies": {
88
"husky": "^9.1.7"

0 commit comments

Comments
 (0)