Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[macOS] Recommended version of brew shellenv usage #10660

Merged
merged 2 commits into from
Sep 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions images/macos/scripts/build/configure-shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ sudo chsh -s /bin/bash root
# Check MacOS architecture and add HOMEBREW PATH to bashrc
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
# Discussed here: https://github.com/Homebrew/brew/pull/18366
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.bashrc
fi