Skip to content

Commit

Permalink
[macOS] Recommended version of brew shellenv usage (actions#10660)
Browse files Browse the repository at this point in the history
Co-authored-by: Carlo Cabrera <[email protected]>
  • Loading branch information
erik-bershel and carlocab committed Sep 26, 2024
1 parent 2661cfa commit 2fea25d
Showing 1 changed file with 2 additions and 4 deletions.
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

0 comments on commit 2fea25d

Please sign in to comment.