Homebrew Fix Warning: Directory must not end with a slash

Today I installed Homebrew, and as suggested, I ran

brew doctor 

I received this warning:

 Warning: Some directories in your path end in a slash. Directories in your path should not end in a slash. This can break other doctor checks. The following directories should be edited: /Users/MyUsername/ 

After that I opened

 vi ~/.bash_profile 

from the terminal and manually deleted "/" after my username. So now my .bash_profile looks like this:

 export PATH=$PATH:/Users/MyUsername export PATH=/usr/local/git/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/Users/MyUsername 

Then I retyped the prompt and received the same warning. How to fix it?

+6
source share
3 answers

Did you try to restart the terminal? Or at least opening a new session (tab)?

+7
source

And if you use zsh, you will need to edit the ~ / .zshrc file and remove the trailing slash at the end of "/ usr / local / bin".

+4
source

After editing your profile, you must inform the OS. From the terminal, run the following command: source ~ / .bash_profile

+1
source

Source: https://habr.com/ru/post/970107/


All Articles