Put user's PATHs at end of superenv PATH
Making sure to remove X11, should be safe if this order is kept. Refs Homebrew/homebrew#14519. Fixes Homebrew/homebrew#14544.
This commit is contained in:
parent
be8827d8a4
commit
ea12f340e7
@ -104,6 +104,7 @@ class << ENV
|
|||||||
paths << HOMEBREW_PREFIX/:bin
|
paths << HOMEBREW_PREFIX/:bin
|
||||||
paths << "#{MacSystem.x11_prefix}/bin" if x11?
|
paths << "#{MacSystem.x11_prefix}/bin" if x11?
|
||||||
paths += %w{/usr/bin /bin /usr/sbin /sbin}
|
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
|
paths.to_path_s
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -213,7 +214,7 @@ end
|
|||||||
|
|
||||||
class Array
|
class Array
|
||||||
def to_path_s
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user