aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew')
-rwxr-xr-xLibrary/Homebrew/cmd/update-bash.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/update-bash.sh b/Library/Homebrew/cmd/update-bash.sh
index 3b3eac482..27cbd32ed 100755
--- a/Library/Homebrew/cmd/update-bash.sh
+++ b/Library/Homebrew/cmd/update-bash.sh
@@ -54,8 +54,8 @@ repo_var() {
upstream_branch() {
local upstream_branch
- upstream_branch="$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null |
- sed -e 's|refs/remotes/origin/||' )"
+ upstream_branch="$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null)"
+ upstream_branch="${upstream_branch#refs/remotes/origin/}"
[[ -z "$upstream_branch" ]] && upstream_branch="master"
echo "$upstream_branch"
}