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:
parent
5b7dd99e99
commit
b118539c8c
3
bin/brew
3
bin/brew
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user