bin/brew: unset functions that override builtins

Also, enable all Bash builtins
This commit is contained in:
Maxim Belkin 2019-11-04 09:56:03 -06:00
parent 5da322d6be
commit 99e308753b
No known key found for this signature in database
GPG Key ID: AC71560D4C5F2338

View File

@ -19,6 +19,13 @@ symlink_target_directory() {
quiet_cd "$directory" && quiet_cd "$target_dirname" && pwd -P
}
for cmd in $(compgen -A builtin)
do
unset -f $cmd # Unset functions that override Bash builtins
enable $cmd # Enable all Bash builtins
done
unset cmd
BREW_FILE_DIRECTORY="$(quiet_cd "${0%/*}/" && pwd -P)"
HOMEBREW_BREW_FILE="${BREW_FILE_DIRECTORY%/}/${0##*/}"
HOMEBREW_PREFIX="${HOMEBREW_BREW_FILE%/*/*}"