diff options
| author | Jack Nagel | 2014-11-11 17:41:19 -0600 |
|---|---|---|
| committer | Jack Nagel | 2014-11-11 17:43:38 -0600 |
| commit | 868c8cdc41edde263972532214b440fd025f7d4c (patch) | |
| tree | 18f3db0ca62142c9c1f52b6461f62a9ef371276d | |
| parent | 7ed0583da77640d709b63a4705eeec20d341b029 (diff) | |
| download | homebrew-868c8cdc41edde263972532214b440fd025f7d4c.tar.bz2 | |
Don't warn about config scripts that originate in the cellar
Fixes Homebrew/homebrew-php#1389.
| -rw-r--r-- | Library/Homebrew/cmd/doctor.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index dcc5c7061..a72ce689f 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -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 |
