Skip to content

Commit 9230c6a

Browse files
committed
fix: husky pre-push script
1 parent 2b051f2 commit 9230c6a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.husky/pre-push

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#!/bin/sh
2-
31
branch=$(git rev-parse --abbrev-ref HEAD)
42
pattern='^[a-z][a-z0-9\/\-]{1,29}$'
53

4+
bash << EOF
5+
66
if [[ ! "$branch" =~ $pattern ]]; then
77
echo """
88
❌ Invalid branch name: '$branch'
@@ -16,4 +16,6 @@ if [[ ! "$branch" =~ $pattern ]]; then
1616
exit 1
1717
fi
1818

19+
EOF
20+
1921
exit 0

0 commit comments

Comments
 (0)