[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
This commit is contained in:
Erik Bershel
2024-09-18 22:49:04 +02:00
committed by GitHub
parent 85fbeaef9b
commit 39297c5658

View File

@@ -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