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.
This commit is contained in:
Mike McQuaid 2016-01-18 09:37:46 +00:00
parent 5b7dd99e99
commit b118539c8c

View File

@ -156,8 +156,7 @@ then
# Hide shellcheck complaint: # Hide shellcheck complaint:
# shellcheck source=/dev/null # shellcheck source=/dev/null
source "$HOMEBREW_BASH_COMMAND" source "$HOMEBREW_BASH_COMMAND"
"$HOMEBREW_COMMAND" "$@" { "$HOMEBREW_COMMAND" "$@"; exit $?; }
exit $?
else else
exec "$HOMEBREW_RUBY_PATH" -W0 "$HOMEBREW_LIBRARY/brew.rb" "$@" exec "$HOMEBREW_RUBY_PATH" -W0 "$HOMEBREW_LIBRARY/brew.rb" "$@"
fi fi