Only run Husky scripts when installed (#27229)

Signed-off-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
Jon Koops 2024-02-26 09:18:16 +01:00 committed by GitHub
parent 1277ab4363
commit a2343740c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,2 +1,11 @@
# Get the path the the Husky script.
DIRNAME="$(dirname "$0")"
FILE="$DIRNAME/_/husky.sh"
# Exit if Husky is not installed.
if [ ! -f "$FILE" ]; then
exit 0;
fi
cd js
pnpm exec lint-staged