Use right command for determining current branch

master
LEdoian 3 years ago
parent 606c8137a9
commit 167d7d6059

@ -23,7 +23,7 @@ fi
# TODO: When deployment is new enough, use the top command. # TODO: When deployment is new enough, use the top command.
#currentbranch="$(git branch --show-current)" #currentbranch="$(git branch --show-current)"
currentbranch="$(git branch --format '%(refname:short)')" currentbranch="$(git rev-parse --abbrev-ref HEAD)"
# If we are not on target branch, switch and run again # If we are not on target branch, switch and run again
if test "$currentbranch" '!=' "$branch"; then if test "$currentbranch" '!=' "$branch"; then

Loading…
Cancel
Save