Reputation: 197
I have placed this line in my .bash_profile.
export PATH="$PATH:/Users/margrietpronk/Developer/flutter/bin"
~
~
".bash_profile" 1L, 63C
Every time I restart my Mac, the path is not there. When I add this path manually, by the same command, then the path is known.
without adding it manually, when I put in echo $path, it shows:
Margrietje@iMac-van-MG ~ % echo $path
/usr/local/bin /usr/bin /bin /usr/sbin /sbin
when I add the command manually, it says:
Margrietje@iMac-van-MG ~ % echo $path
/usr/local/bin /usr/bin /bin /usr/sbin /sbin /Users/margrietpronk/Developer/flutter/bin
Then the path is working. How can I fix this? I thought it has to do with the name "Margrietje" before the @ ???
Upvotes: 0
Views: 166
Reputation: 197
I have switched back to the zsh shell, as advised by @chepner First I had to make the file .zshrc, because it wasn't there. I have edit it explained here: https://superuser.com/questions/886132/where-is-the-zshrc-file-on-mac
I have put in the path for flutter: export PATH="$PATH:/Users/margrietpronk/Developer/flutter/bin"
Then I switched in the terminal to the zsh shell: chsh -s /bin/zsh
The path is working now. Hope this is helping somebody with the same problem as I had.
Upvotes: 0
Reputation: 22225
You tagged your question bash, but the fact that echo $path
outputs the PATH as array, indicates that you are not using bash. My guess is that you are running Zsh, because in Zsh, PATH
and path
are kept in sync. You can verify this by doing a
echo $BASH_VERSION
and
echo $ZSH_VERSION
Of course if you do run Zsh, changing .bash_profile
has no effect, and the changes should go into .zshrc
.
Upvotes: 3