Skip to content

Commit

Permalink
fix: unbound variable
Browse files Browse the repository at this point in the history
  • Loading branch information
typicode committed Jan 25, 2024
1 parent 7298ca1 commit e6b2d0f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions husky.sh
@@ -1,5 +1,6 @@
#!/usr/bin/env sh
[ "$HUSKY" = "2" ] && set -x
H="$HUSKY"
[ "$H" = "2" ] && set -x
h="${0##*/}"
s="${0%/*/*}/$h"

Expand All @@ -10,7 +11,7 @@ for f in "${XDG_CONFIG_HOME:-$HOME/.config}/husky/init.sh" "$HOME/.huskyrc.sh";
[ -f "$f" ] && . "$f"
done

[ "${HUSKY-}" = "0" ] && exit 0
[ "$H" = "0" ] && exit 0

sh -e "$s" "$@"
c=$?
Expand Down

0 comments on commit e6b2d0f

Please sign in to comment.