brew.sh: fix update-if-needed failing after update

This commit is contained in:
Bo Anderson 2025-04-02 02:44:12 +01:00
parent b4ae6f5513
commit e0f7085299
No known key found for this signature in database

View File

@ -373,8 +373,11 @@ auto-update() {
unset HOMEBREW_AUTO_UPDATING
unset HOMEBREW_AUTO_UPDATE_TAP
# exec a new process to set any new environment variables.
exec "${HOMEBREW_BREW_FILE}" "$@"
if [[ $# -gt 0 ]]
then
# exec a new process to set any new environment variables.
exec "${HOMEBREW_BREW_FILE}" "$@"
fi
fi
unset AUTO_UPDATE_COMMANDS