aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorSamuel John2013-06-12 09:28:33 +0200
committerSamuel John2013-09-03 11:44:48 +0200
commita260bb19061aabf9ddcb45926bac57a10d30b05c (patch)
treeb05583fc5bee88f188f8499e25d9c4e6b6a631ab /Library
parent5515fda59a2941db438aa567d1de0c0a508f7625 (diff)
downloadbrew-a260bb19061aabf9ddcb45926bac57a10d30b05c.tar.bz2
doctor: be more helpful with suggestion about PATH
- 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.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/doctor.rb18
1 files changed, 10 insertions, 8 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 3dff2e9ef..a39b19349 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -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
@@ -469,9 +470,9 @@ end
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
@@ -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