Fixed the test to actually catch master.
This commit is contained in:
parent
e111b57a86
commit
8c25557bf5
|
@ -4,7 +4,7 @@ PROTECTED_BRANCH="master"
|
|||
REMOTE_REF=$(echo "$HUSKY_GIT_STDIN" | cut -d " " -f 3)
|
||||
|
||||
if [ -n "$REMOTE_REF" ]; then
|
||||
if [ -z "${REMOTE_REF##$PROTECTED_BRANCH}" ]; then
|
||||
if [ "refs/heads/${PROTECTED_BRANCH}" == "$REMOTE_REF" ]; then
|
||||
printf "%sYou're about to push to master, is that what you intended? [y/N]: %s" "$(tput setaf 3)" "$(tput sgr0)"
|
||||
read -r PROCEED < /dev/tty
|
||||
echo
|
||||
|
|
Loading…
Reference in New Issue