diff options
| author | Samuel John | 2013-06-12 09:28:33 +0200 |
|---|---|---|
| committer | Samuel John | 2013-09-03 11:44:48 +0200 |
| commit | 040bb3e7d15e5d453faec3e3071a74a5b5df8e3d (patch) | |
| tree | 2baa9923a38e89b54b3bed34d45551e342219d76 /Library/Homebrew/cmd/doctor.rb | |
| parent | d2fea17e176eb06f41b8688484113b13485179e1 (diff) | |
| download | homebrew-040bb3e7d15e5d453faec3e3071a74a5b5df8e3d.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/Homebrew/cmd/doctor.rb')
| -rw-r--r-- | Library/Homebrew/cmd/doctor.rb | 18 |
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 |
