aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xLibrary/Homebrew/install.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/Library/Homebrew/install.rb b/Library/Homebrew/install.rb
index 72fb2a1fa..3b06cf8bc 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