Skip to content

Commit ea2e5cb

Browse files
chore(husky): don't fail if there is no upstream
1 parent 9f55e92 commit ea2e5cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.husky/pre-push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
remote_branch="$(git rev-parse --abbrev-ref --symbolic-full-name '@{u}')"
1+
remote_branch="$(git rev-parse --abbrev-ref --symbolic-full-name '@{u}' 2>/dev/null || echo "no_upstream")"
22

33
if [[ "$remote_branch" == "origin/master" ]]; then
44
bun commitlint --from="$remote_branch" --to=HEAD

0 commit comments

Comments
 (0)