[3.4] Add brew shellenv to shell profile in macOS install guide (#5993) (#6071)

This commit is contained in:
Jakub Kuczys
2023-04-20 00:30:05 +02:00
committed by GitHub
parent d3363d560c
commit a6009c7a3a

View File

@@ -15,6 +15,9 @@ following, then press Enter:
.. prompt:: bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew_location="$([ -n "$HOMEBREW_PREFIX" ] && echo "$HOMEBREW_PREFIX" || ([ "$(/usr/bin/uname -m)" = "arm64" ] && echo /opt/homebrew || echo /usr/local))/bin/brew"
printf '\neval "$(%s shellenv)"\n' "$brew_location" >> "$([ -n "$ZSH_VERSION" ] && echo ~/.zprofile || ([ -f ~/.bash_profile ] && echo ~/.bash_profile || echo ~/.profile))"
eval "$("$brew_location" shellenv)"
After the installation, install the required packages by pasting the commands and pressing enter,
one-by-one:
@@ -31,9 +34,8 @@ To fix this, you should run these commands:
.. prompt:: bash
profile=$([ -n "$ZSH_VERSION" ] && echo ~/.zprofile || ([ -f ~/.bash_profile ] && echo ~/.bash_profile || echo ~/.profile))
echo 'export PATH="$(brew --prefix)/opt/python@3.9/bin:$PATH"' >> "$profile"
source "$profile"
echo 'export PATH="$(brew --prefix)/opt/python@3.9/bin:$PATH"' >> "$([ -n "$ZSH_VERSION" ] && echo ~/.zprofile || ([ -f ~/.bash_profile ] && echo ~/.bash_profile || echo ~/.profile))"
export PATH="$(brew --prefix)/opt/python@3.9/bin:$PATH"
.. Include common instructions: