From 96449a94e004ccd71e266741fde041769f8e4014 Mon Sep 17 00:00:00 2001 From: Asutosh Palai Date: Wed, 4 Jan 2023 21:46:30 +0000 Subject: [PATCH] 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. --- Library/Homebrew/brew.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index 8d34654da7..5f27410d12 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -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