Last active
June 26, 2023 19:56
-
-
Save jabenninghoff/7692a2bdc4007602638cd5bef1b8c0e9 to your computer and use it in GitHub Desktop.
Add homebrew to environment if installed (arm or intel)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remove /usr/local/bin from /etc/paths | |
export PATH="$PATH:s/\/usr\/local\/bin://" | |
# add homebrew to environment | |
if [ -x /usr/local/bin/brew ] | |
then | |
eval "$(/usr/local/bin/brew shellenv)" | |
elif [ -x /opt/homebrew/bin/brew ] | |
then | |
export PATH="/usr/local/bin:/usr/local/sbin${PATH+:$PATH}" | |
eval "$(/opt/homebrew/bin/brew shellenv)" | |
else | |
export PATH="/usr/local/bin:/usr/local/sbin${PATH+:$PATH}" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment