From 057294a9855f5b7caa8ef119d20a96cc9f841342 Mon Sep 17 00:00:00 2001 From: developomp Date: Wed, 28 Feb 2024 23:34:32 +0900 Subject: [PATCH] chore: allow nvm to be used with husky --- .husky/commit-msg | 6 ++++++ .husky/terraform | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.husky/commit-msg b/.husky/commit-msg index e998e31..34dd7db 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1,10 @@ #!/usr/bin/env sh +export NVM_DIR="$HOME/.nvm" + +if [ -s "$NVM_DIR/nvm.sh" ]; then + . "$NVM_DIR/nvm.sh" +fi + . "$(dirname -- "$0")/_/husky.sh" npx --no -- commitlint --edit "${1}" diff --git a/.husky/terraform b/.husky/terraform index 5664901..39e09b0 100755 --- a/.husky/terraform +++ b/.husky/terraform @@ -1,4 +1,10 @@ #!/usr/bin/env sh +export NVM_DIR="$HOME/.nvm" + +if [ -s "$NVM_DIR/nvm.sh" ]; then + . "$NVM_DIR/nvm.sh" +fi + . "$(dirname -- "$0")/_/husky.sh" terraform fmt -check