Don't warn about config scripts that originate in the cellar

Fixes Homebrew/homebrew-php#1389.
This commit is contained in:
Jack Nagel 2014-11-11 17:41:19 -06:00
parent e537fc41de
commit f27468507c

View File

@ -666,9 +666,10 @@ def check_for_config_scripts
].map(&:downcase)
paths.each do |p|
next if whitelist.include?(p.downcase) ||
p.start_with?(real_cellar.to_s, HOMEBREW_CELLAR.to_s) ||
!File.directory?(p)
next if whitelist.include?(p.downcase) || !File.directory?(p)
realpath = Pathname.new(p).realpath.to_s
next if realpath.start_with?(real_cellar.to_s, HOMEBREW_CELLAR.to_s)
scripts += Dir.chdir(p) { Dir["*-config"] }.map { |c| File.join(p, c) }
end