From 7b16d1e4787f9ca1d41c199396b228b70a6235ca Mon Sep 17 00:00:00 2001 From: Tom Richards Date: Tue, 22 Oct 2024 16:17:29 +0100 Subject: [PATCH] run `fnm use` and `nvm use` to ensure correct version of node before executing the various steps in the `pre-commit` hook (configured via husky) --- .husky/pre-commit | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.husky/pre-commit b/.husky/pre-commit index 76291bd8..79d371fc 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,8 +1,13 @@ #!/bin/sh +echo "Running pre-commit hook" + . "$(dirname "$0")/_/husky.sh" set -e +fnm use || true +nvm use || true + corepack enable yarn lint-staged