diff --git a/Library/Homebrew/install.rb b/Library/Homebrew/install.rb index 72fb2a1fa7..3b06cf8bc2 100755 --- a/Library/Homebrew/install.rb +++ b/Library/Homebrew/install.rb @@ -50,6 +50,19 @@ def install f raise "Nothing was installed to #{f.prefix}" unless f.installed? + # warn the user if stuff was installed outside of their PATH + paths = ENV['PATH'].split(':').collect{|p| File.expand_path p} + [f.bin, f.sbin].each do |bin| + if bin.directory? + rootbin = (HOMEBREW_PREFIX+bin.basename).to_s + bin = File.expand_path bin + unless paths.include? rootbin + opoo "#{rootbin} is not in your PATH" + puts "You can amend this by altering your ~/.bashrc file" + end + end + end + begin Keg.new(f.prefix).link rescue Exception