Ensure latest dependencies are installed before running pre-commit hook (#32797)

Signed-off-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
Jon Koops 2024-09-11 13:57:57 +02:00 committed by GitHub
parent d85ce41377
commit 0623dba747
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,4 +17,13 @@ if ! [ -x "$(command -v pnpm)" ]; then
exit 0; exit 0;
fi 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 pnpm exec lint-staged