diff --git a/Library/Homebrew/superenv.rb b/Library/Homebrew/superenv.rb index 1fd8b40310..9300d39f83 100644 --- a/Library/Homebrew/superenv.rb +++ b/Library/Homebrew/superenv.rb @@ -104,6 +104,7 @@ class << ENV paths << HOMEBREW_PREFIX/:bin paths << "#{MacSystem.x11_prefix}/bin" if x11? paths += %w{/usr/bin /bin /usr/sbin /sbin} + paths += ORIGINAL_PATHS.map{|pn| pn.realpath.to_s rescue nil } - %w{/usr/X11/bin /opt/X11/bin} paths.to_path_s end @@ -213,7 +214,7 @@ end class Array def to_path_s - map(&:to_s).select{|s| s and File.directory? s }.join(':').chuzzle + map(&:to_s).uniq.select{|s| File.directory? s }.join(':').chuzzle end end