Skip to content

Commit

Permalink
fix doctor command in case Cellar dir doesn't yet exist
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
  • Loading branch information
mislav authored and adamv committed Jun 4, 2011
1 parent 1accde3 commit 0d28bc7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Library/Homebrew/cmd/doctor.rb
Expand Up @@ -441,13 +441,13 @@ def check_for_iconv
end

def check_for_config_scripts
real_cellar = HOMEBREW_CELLAR.realpath
real_cellar = HOMEBREW_CELLAR.exist? && HOMEBREW_CELLAR.realpath

config_scripts = []

path_folders.each do |p|
next if ['/usr/bin', '/usr/sbin', '/usr/X11/bin', "#{HOMEBREW_PREFIX}/bin", "#{HOMEBREW_PREFIX}/sbin"].include? p
next if p =~ %r[^(#{real_cellar.to_s}|#{HOMEBREW_CELLAR.to_s})]
next if p =~ %r[^(#{real_cellar.to_s}|#{HOMEBREW_CELLAR.to_s})] if real_cellar

configs = Dir["#{p}/*-config"]
# puts "#{p}\n #{configs * ' '}" unless configs.empty?
Expand Down Expand Up @@ -504,6 +504,7 @@ def check_for_symlinked_cellar
end

def check_for_multiple_volumes
return unless HOMEBREW_CELLAR.exist?
volumes = Volumes.new

# Find the volumes for the TMP folder & HOMEBREW_CELLAR
Expand Down

0 comments on commit 0d28bc7

Please sign in to comment.