Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fixing Homebrew Warning: Directory should not end in a slash

I installed Homebrew today, and as the application suggested, I ran

brew doctor

I got 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 googling this, I opened

vi ~/.bash_profile

from terminal and manually removed the "/" 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 got the same warning. How do I fix this?

like image 401
user3025403 Avatar asked May 30 '14 20:05

user3025403


3 Answers

Did you try restarting Terminal? Or at least opening a new session (tab)?

like image 171
ejramire Avatar answered Nov 17 '22 19:11

ejramire


And if you're using zsh, you'll need to edit the ~/.zshrc file and remove the trailing slash on the end of "/usr/local/bin" as well.

like image 23
Jason Rueckert Avatar answered Nov 17 '22 21:11

Jason Rueckert


After editing your profile, you have to tell the OS. From the terminal, execute the following command: source ~/.bash_profile

like image 33
Andrew Avatar answered Nov 17 '22 21:11

Andrew