From 39297c56586b30c1ada412b9f73705e48c5195f8 Mon Sep 17 00:00:00 2001 From: Erik Bershel <110455084+erik-bershel@users.noreply.github.com> Date: Wed, 18 Sep 2024 22:49:04 +0200 Subject: [PATCH] [macOS] Fix for Homebrew shellenv bug to unlock PATH (#10642) * [macOS] Fix for Homebrew shellenv bug to unlock PATH * Add Homebrew default PATH back to bashrc --- images/macos/scripts/build/configure-shell.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/images/macos/scripts/build/configure-shell.sh b/images/macos/scripts/build/configure-shell.sh index ec12cbeb7..92b23409e 100644 --- a/images/macos/scripts/build/configure-shell.sh +++ b/images/macos/scripts/build/configure-shell.sh @@ -15,4 +15,7 @@ sudo chsh -s /bin/bash root if [[ $arch == "arm64" ]]; then echo "Adding Homebrew environment to bash" /opt/homebrew/bin/brew shellenv >> ~/.bashrc + # Workaround for the issue (#10624) with the Homebrew PATH in the bashrc + sed -i '' '/; export PATH;/d' ~/.bashrc + echo 'export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH"' >> ~/.bashrc fi