diff options
| author | Zhiming Wang | 2016-09-24 05:45:21 -0400 |
|---|---|---|
| committer | Zhiming Wang | 2016-09-24 05:49:04 -0400 |
| commit | 07866f0b54e0d8cd26f761922f242aa0ec73c40c (patch) | |
| tree | 54e18db47961d5217fbc944a2e536b0311c6967a /Library/Homebrew/cmd | |
| parent | 12aad5c65fee39c5f044e39ca1efcbed58aebd39 (diff) | |
| download | brew-07866f0b54e0d8cd26f761922f242aa0ec73c40c.tar.bz2 | |
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.
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/update.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index 177958266..ba230bdec 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -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 |
