Skip to content

Commit

Permalink
Add PATH to node_modules/.bin in husky script
Browse files Browse the repository at this point in the history
  • Loading branch information
typicode committed Feb 17, 2024
1 parent e77754d commit dfe959f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion husky
@@ -1,12 +1,12 @@
#!/usr/bin/env sh
# shellcheck disable=SC1090
[ "$HUSKY" = "2" ] && set -x
h="${0##*/}"
s="${0%/*/*}/$h"

[ ! -f "$s" ] && exit 0

for f in "${XDG_CONFIG_HOME:-$HOME/.config}/husky/init.sh" "$HOME/.huskyrc"; do
# shellcheck disable=SC1090
[ -f "$f" ] && . "$f"
done
[ "${HUSKY-}" = "0" ] && exit 0
Expand All @@ -27,4 +27,5 @@ h() {
}
trap 'c=$?; h' EXIT
set -e
PATH=node_modules/.bin:$PATH
. "$s"

0 comments on commit dfe959f

Please sign in to comment.