From 797dfdfa7162c6114b44b3818fd5eeee1df0cc2d Mon Sep 17 00:00:00 2001 From: typicode Date: Fri, 26 Jan 2024 00:32:21 +0100 Subject: [PATCH] Fix: unbound variable (#1359) * fix: unbound variable * fix: unbound variable --- husky.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/husky.sh b/husky.sh index 2467495b8..427840b72 100644 --- a/husky.sh +++ b/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" @@ -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=$?