Skip to content

Commit 93f3b10

Browse files
committed
Bumped husky hook scripts
1 parent 4af4fe2 commit 93f3b10

File tree

15 files changed

+34
-24
lines changed

15 files changed

+34
-24
lines changed

.husky/_/applypatch-msg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env sh
2-
. "${0%/*}/h"
2+
. "$(dirname "$0")/h"

.husky/_/commit-msg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env sh
2-
. "${0%/*}/h"
2+
. "$(dirname "$0")/h"

.husky/_/h

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
#!/usr/bin/env sh
2-
H="$HUSKY"
3-
[ "$H" = "2" ] && set -x
4-
h="${0##*/}"
5-
s="${0%/*/*}/$h"
2+
[ "$HUSKY" = "2" ] && set -x
3+
n=$(basename "$0")
4+
s=$(dirname "$(dirname "$0")")/$n
65

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

9-
for f in "${XDG_CONFIG_HOME:-$HOME/.config}/husky/init.sh" "$HOME/.huskyrc"; do
10-
# shellcheck disable=SC1090
11-
[ -f "$f" ] && . "$f"
12-
done
8+
if [ -f "$HOME/.huskyrc" ]; then
9+
echo "husky - '~/.huskyrc' is DEPRECATED, please move your code to ~/.config/husky/init.sh"
10+
fi
11+
i="${XDG_CONFIG_HOME:-$HOME/.config}/husky/init.sh"
12+
[ -f "$i" ] && . "$i"
1313

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

16+
export PATH="node_modules/.bin:$PATH"
1617
sh -e "$s" "$@"
1718
c=$?
1819

19-
[ $c != 0 ] && echo "husky - $h script failed (code $c)"
20+
[ $c != 0 ] && echo "husky - $n script failed (code $c)"
2021
[ $c = 127 ] && echo "husky - command not found in PATH=$PATH"
21-
exit $c
22+
exit $c

.husky/_/husky.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
echo "husky - DEPRECATED
2+
3+
Please remove the following two lines from $0:
4+
5+
#!/usr/bin/env sh
6+
. \"\$(dirname -- \"\$0\")/_/husky.sh\"
7+
8+
They WILL FAIL in v10.0.0
9+
"

.husky/_/post-applypatch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env sh
2-
. "${0%/*}/h"
2+
. "$(dirname "$0")/h"

.husky/_/post-checkout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env sh
2-
. "${0%/*}/h"
2+
. "$(dirname "$0")/h"

.husky/_/post-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env sh
2-
. "${0%/*}/h"
2+
. "$(dirname "$0")/h"

.husky/_/post-merge

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env sh
2-
. "${0%/*}/h"
2+
. "$(dirname "$0")/h"

.husky/_/post-rewrite

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env sh
2-
. "${0%/*}/h"
2+
. "$(dirname "$0")/h"

.husky/_/pre-applypatch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env sh
2-
. "${0%/*}/h"
2+
. "$(dirname "$0")/h"

0 commit comments

Comments
 (0)