Skip to content
Snippets Groups Projects
Commit bcb8fcf6 authored by Mislav Marohnić's avatar Mislav Marohnić Committed by Adam Vandenberg
Browse files

fix `doctor` command in case Cellar dir doesn't yet exist

parent 884048c5
No related branches found
No related tags found
No related merge requests found
......@@ -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?
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment