Where does brew set $PATH on OSX (mac)? #4452
Replies: 3 comments 1 reply
-
You probably have an
somewhere in your config files that does this. |
Beta Was this translation helpful? Give feedback.
-
If you copy-pasted output of Homebrew installer, then it will be in:
See: https://github.com/Homebrew/install/blob/master/install.sh#L992-L1005 For interactive+login ZSH terminal, your shell will load Other config files also exist that you may want to check. |
Beta Was this translation helpful? Give feedback.
-
@mecoookie, did you ever find out where brew sets the $PATH? I'm looking everywhere on my end and can't find a single thing setting it - no idea how it is ending up in the $PATH. |
Beta Was this translation helpful? Give feedback.
-
Output of
brew config
Output of
brew doctor
Description of issue
Where does brew modify the $PATH on OSX (Mac)?
This is the output of my path directory:
% echo $PATH
/Users/josh/opt/anaconda3/bin:/Users/josh/opt/anaconda3/condabin:/usr/local/opt/python/libexec/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Little Snitch.app/Contents/Components:/Library/Apple/usr/bin
I have brew installed with conda, and I'm finding conda puts it's paths in the front head of homebrew, but I can't find where brew actually sets it's path variables!
I checked my .zshrc, .bash_profile, /etc/paths, and /etc/paths.d.
I can't find anywhere that the Brew directories are adde to $PATH. Is it a new setting in the system somewhere? or a file I don't know?
I want to make sure brew commands are taking preference, at least during testing, so I'd like to set my path so the brew directories come first.
Beta Was this translation helpful? Give feedback.
All reactions