Add additional checks for pre-commit hook (#32142)
Signed-off-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
parent
ac1faa8c78
commit
3fda9f447d
1 changed files with 10 additions and 0 deletions
|
@ -7,4 +7,14 @@ if [ ! -f "$FILE" ]; then
|
|||
exit 0;
|
||||
fi
|
||||
|
||||
# Exit if dependencies are not installed.
|
||||
if [ ! -d "node_modules" ]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
# Exit if pnpm is not installed.
|
||||
if ! [ -x "$(command -v pnpm)" ]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
pnpm exec lint-staged
|
||||
|
|
Loading…
Reference in a new issue