restoring the original path after update

This fix is required for ARM Linux where portable Homebrew Portable Ruby is not
available. Without this fix, after auto update, brew is restarted with cleaned up path.
This causes it to pick not find user installed Ruby by RVM or rbenv, causing brew to fail.
This commit is contained in:
Asutosh Palai 2023-01-04 21:46:30 +00:00
parent e76c55e184
commit 96449a94e0

View File

@ -277,6 +277,9 @@ auto-update() {
unset HOMEBREW_AUTO_UPDATING
# restore old path for user installed Ruby version.
export PATH=${HOMEBREW_PATH}
# exec a new process to set any new environment variables.
exec "${HOMEBREW_BREW_FILE}" "$@"
fi