Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
doctor: be more helpful with suggestion about PATH
Browse files Browse the repository at this point in the history
- Show a one liner that will append to
  the user's ~/.bash_profile. In 95% this will be
  ok and we assume zsh people are smart enough
  to know what they have to do.
  • Loading branch information
samueljohn committed Sep 3, 2013
1 parent d2fea17 commit 040bb3e
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Library/Homebrew/cmd/doctor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,9 @@ def check_user_path_1
#{conflicts * "\n "}
Consider amending your PATH so that #{HOMEBREW_PREFIX}/bin
occurs before /usr/bin in your PATH.
Consider setting your PATH so that #{HOMEBREW_PREFIX}/bin
occurs before /usr/bin. Here is a one-liner:
echo export PATH="#{HOMEBREW_PREFIX}/bin:$PATH" >> ~/.bash_profile
EOS
end
end
Expand All @@ -469,9 +470,9 @@ def check_user_path_1
def check_user_path_2
unless $seen_prefix_bin
<<-EOS.undent
Homebrew's bin was not found in your path.
Consider amending your PATH variable so it contains:
#{HOMEBREW_PREFIX}/bin
Homebrew's bin was not found in your PATH.
Consider setting the PATH for example like so
echo export PATH="#{HOMEBREW_PREFIX}/bin:$PATH" >> ~/.bash_profile
EOS
end
end
Expand All @@ -482,9 +483,10 @@ def check_user_path_3
if sbin.directory? and sbin.children.length > 0
unless $seen_prefix_sbin
<<-EOS.undent
Homebrew's sbin was not found in your path.
Consider amending your PATH variable so it contains:
#{HOMEBREW_PREFIX}/sbin
Homebrew's sbin was not found in your PATH but you have installed
formulae that put executables in #{HOMEBREW_PREFIX}/sbin.
Consider setting the PATH for example like so
echo export PATH="#{HOMEBREW_PREFIX}/sbin:$PATH" >> ~/.bash_profile
EOS
end
end
Expand Down

0 comments on commit 040bb3e

Please sign in to comment.