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.
This commit is contained in:
parent
5515fda59a
commit
a260bb1906
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user