update.sh: do not restore stable (tag) branch
Restoring stable branch post-update could lead to unsuspecting users with homebrew.devcmdrun being stuck forever on an old tag. Fixes #1111.
This commit is contained in:
parent
12aad5c65f
commit
07866f0b54
@ -297,7 +297,8 @@ EOS
|
||||
|
||||
if [[ -n "$HOMEBREW_NO_UPDATE_CLEANUP" ]]
|
||||
then
|
||||
if [[ "$INITIAL_BRANCH" != "$UPSTREAM_BRANCH" && -n "$INITIAL_BRANCH" ]]
|
||||
if [[ "$INITIAL_BRANCH" != "$UPSTREAM_BRANCH" && -n "$INITIAL_BRANCH" &&
|
||||
! "$INITIAL_BRANCH" =~ ^v[0-9]+\.[0-9]+\.[0-9]$ ]]
|
||||
then
|
||||
git checkout "$INITIAL_BRANCH" "${QUIET_ARGS[@]}"
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user