Ensure latest dependencies are installed before running pre-commit hook (#32797)
Signed-off-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
parent
d85ce41377
commit
0623dba747
1 changed files with 9 additions and 0 deletions
|
@ -17,4 +17,13 @@ if ! [ -x "$(command -v pnpm)" ]; then
|
|||
exit 0;
|
||||
fi
|
||||
|
||||
echo "Running pre-commit hook…";
|
||||
|
||||
# Ensure latest dependencies are installed, and exit if unable to install.
|
||||
pnpm install --reporter=silent || {
|
||||
echo "Unable to install dependencies, skipping pre-commit hook.";
|
||||
exit 0;
|
||||
}
|
||||
|
||||
# Run lint-staged.
|
||||
pnpm exec lint-staged
|
||||
|
|
Loading…
Reference in a new issue