aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2016-01-18 09:37:46 +0000
committerMike McQuaid2016-01-18 09:37:46 +0000
commitb118539c8c17147e76eed7a0caf44e537f170f43 (patch)
tree1f2ab8c01ec2dbf4337d394853959b3c2b5d1862
parent5b7dd99e999111045348637b51bd85e01d88afda (diff)
downloadbrew-b118539c8c17147e76eed7a0caf44e537f170f43.tar.bz2
bin/brew: use a function to avoid issues.
Otherwise when `bin/brew` is updated in-place Bash will carry on from the offset and this can cause issues. Thanks to `@UniqMartin` for pointing this out.
-rwxr-xr-xbin/brew3
1 files changed, 1 insertions, 2 deletions
diff --git a/bin/brew b/bin/brew
index b0e38aba4..7eeb35db7 100755
--- a/bin/brew
+++ b/bin/brew
@@ -156,8 +156,7 @@ then
# Hide shellcheck complaint:
# shellcheck source=/dev/null
source "$HOMEBREW_BASH_COMMAND"
- "$HOMEBREW_COMMAND" "$@"
- exit $?
+ { "$HOMEBREW_COMMAND" "$@"; exit $?; }
else
exec "$HOMEBREW_RUBY_PATH" -W0 "$HOMEBREW_LIBRARY/brew.rb" "$@"
fi