From 6867e8fdd405eb1a3b120b0c7b315b11d7835eb1 Mon Sep 17 00:00:00 2001 From: Abdessattar Sassi <457645+abdes@users.noreply.github.com> Date: Wed, 9 Mar 2022 02:17:46 +0400 Subject: [PATCH] chore: make husky work on macOS commitlint has some issue working with globally installed npm packages. See conventional-changelog/commitlint#613 for more details. The workaround is to not set the commitlint config in its config file but instead pass the full path to the module in the command line of commitlint. --- .husky/commit-msg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.husky/commit-msg b/.husky/commit-msg index e8511ea..b30d59a 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1,4 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -npx --no-install commitlint --edit $1 +npx --no-install commitlint -x $(npm root -g)/@commitlint/config-conventional --edit $1