Only run Husky scripts when installed (#27229)
Signed-off-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
parent
1277ab4363
commit
a2343740c8
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue