doctor: ignore case when checking PATH for config scripts
Fixes Homebrew/homebrew#14752. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
6a131ced3f
commit
b20c35cf0e
@ -533,8 +533,11 @@ def check_for_config_scripts
|
|||||||
|
|
||||||
config_scripts = []
|
config_scripts = []
|
||||||
|
|
||||||
|
whitelist = %W[/usr/bin /usr/sbin /usr/X11/bin /usr/X11R6/bin /opt/X11/bin #{HOMEBREW_PREFIX}/bin #{HOMEBREW_PREFIX}/sbin]
|
||||||
|
whitelist.map! { |d| d.downcase }
|
||||||
|
|
||||||
path_folders.each do |p|
|
path_folders.each do |p|
|
||||||
next if ['/usr/bin', '/usr/sbin', '/usr/X11/bin', '/usr/X11R6/bin', "#{HOMEBREW_PREFIX}/bin", "#{HOMEBREW_PREFIX}/sbin", "/opt/X11/bin"].include? p
|
next if whitelist.include? p.downcase
|
||||||
next if p =~ %r[^(#{real_cellar.to_s}|#{HOMEBREW_CELLAR.to_s})] if real_cellar
|
next if p =~ %r[^(#{real_cellar.to_s}|#{HOMEBREW_CELLAR.to_s})] if real_cellar
|
||||||
|
|
||||||
configs = Dir["#{p}/*-config"]
|
configs = Dir["#{p}/*-config"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user