mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 22:05:17 +00:00
[macOS] Recommended version of brew shellenv usage (#10660)
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
This commit is contained in:
@@ -14,8 +14,6 @@ sudo chsh -s /bin/bash root
|
|||||||
# Check MacOS architecture and add HOMEBREW PATH to bashrc
|
# Check MacOS architecture and add HOMEBREW PATH to bashrc
|
||||||
if [[ $arch == "arm64" ]]; then
|
if [[ $arch == "arm64" ]]; then
|
||||||
echo "Adding Homebrew environment to bash"
|
echo "Adding Homebrew environment to bash"
|
||||||
/opt/homebrew/bin/brew shellenv >> ~/.bashrc
|
# Discussed here: https://github.com/Homebrew/brew/pull/18366
|
||||||
# Workaround for the issue (#10624) with the Homebrew PATH in the bashrc
|
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.bashrc
|
||||||
sed -i '' '/; export PATH;/d' ~/.bashrc
|
|
||||||
echo 'export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH"' >> ~/.bashrc
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user