Skip to content

Commit 797dfdf

Browse files
authored
Fix: unbound variable (#1359)
* fix: unbound variable * fix: unbound variable
1 parent e7ada20 commit 797dfdf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

husky.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env sh
2-
[ "$HUSKY" = "2" ] && set -x
2+
H="$HUSKY"
3+
[ "$H" = "2" ] && set -x
34
h="${0##*/}"
45
s="${0%/*/*}/$h"
56

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

13-
[ "$HUSKY" = "0" ] && exit 0
14+
[ "$H" = "0" ] && exit 0
1415

1516
sh -e "$s" "$@"
1617
c=$?

0 commit comments

Comments
 (0)