aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/extend')
-rw-r--r--Library/Homebrew/extend/ENV.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb
index 668fd29bd..b3b8d26b3 100644
--- a/Library/Homebrew/extend/ENV.rb
+++ b/Library/Homebrew/extend/ENV.rb
@@ -431,6 +431,11 @@ class << ENV
append 'CPPFLAGS', "-DNCURSES_OPAQUE=0"
end
+ def userpaths!
+ paths = ORIGINAL_PATHS.map { |p| p.realpath.to_s rescue nil } - %w{/usr/X11/bin /opt/X11/bin}
+ self['PATH'] = paths.unshift(*self['PATH'].split(":")).uniq.join(":")
+ end
+
def fortran
fc_flag_vars = %w{FCFLAGS FFLAGS}