Updating the PATH for homebrew after install #194
cheema-corellian
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Thanks Jeff for enabling discussions for this repo!
I am new to Ansible and this playbook and have a few questions for this community. I'll just start with one for now.
So, it appears that Homebrew does not update the PATH for the user after it is installed. Instead they ask the user to update the .zprofile manually. I am guessing there is a good reason for them not updating the .zprofile during the Homebrew install process. That discussion aside, I would like to automate this as part of my playbook.
I was about to update my main.yml with an entry like this:
And then I noticed that the dotfiles are installed by default by this project, including .zshrc. They didn't install for me. I am not sure why. Maybe I am supposed to git clone it in the default ~/Development/GitHub/dotfiles folder? Anyway, the .zshrc does update the PATH like this:
export PATH=$HOME/Library/Python/3.9/bin:/opt/homebrew/bin:/usr/local/bin:/usr/local/sbin:$HOME/bin:$HOME/go/bin:$HOME/.cargo/bin:/usr/local/git/bin:$HOME/.composer/vendor/bin:$PATH
This is different from the Homebrew recommendation, which asks to put the PATH in .zprofile instead. And have this entry for Homebrew in that file:
eval "$(/opt/homebrew/bin/brew shellenv)"
All of this is super minor stuff. But, we are all trying to automate it all away, which is a very nice thing to have.
Beta Was this translation helpful? Give feedback.
All reactions