2

As subject says, running

brew doctor

responds with following warnings:

Warning: /usr/bin occurs before /usr/local/bin This means that system-provided programs will be used instead of those provided by Homebrew. The following tools exist at both paths: ... Warning: Homebrew's bin was not found in your PATH. .... Warning: Homebrew's sbin was not found in your PATH but you have installed formulae that put executables in /usr/local/sbin.

However, when I echo PATH, it shows /usr/local/bin as being before /usr/bin

/Users/bryce/.nvm/v0.10.32/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/bryce/bin:/Users/bryce/.rbenv/bin:/Users/bryce/.rbenv/shims:/Users/bryce/opt/Sencha/Cmd/4.0.0.203:/Users/bryce/Development/tools/apache-maven-3.1.1/bin:/opt/X11/bin:/usr/local/git/bin:/Users/bryce/.homesick/repos/bzdots/custom/bin

I'm running ZSH, iTerm on Mac OS X (Yosemite). Gut feeling is that these warnings aren't really important to me, but the OCD part of me wants to get rid of all warnings....

UPDATE: Francisco below had the right idea. Turns out, I think it was an iTerm issue. I found the following while researching another issue I was looking for. So, I just changed the default profile's command from "Login shell" to:

/bin/bash -c /bin/zsh

And its all happy.

Community
  • 1
  • 1
Bryce Fischer
  • 5,336
  • 9
  • 30
  • 36
  • You could sprinkle some debug output in `/usr/local/Library/Homebrew/cmd/doctor.rb` function `check_user_path_1` to check what it's thinking. – Peter Eisentraut Nov 14 '14 at 16:17

1 Answers1

3

My best guess is that your PATH settings are dependent on whether your shell is running interactively or non-interactively?

Try running both:

zsh -i -c "echo \$PATH"
zsh -c "echo \$PATH"

and see if the output differs. Brew is likely reporting on your non-interactive path.

Francisco
  • 3,980
  • 1
  • 23
  • 27