Check Cellar can be made before installing stuff

Refs Homebrew/homebrew#5188.
This commit is contained in:
Max Howell 2011-09-15 10:57:03 +01:00
parent f4c301a827
commit 95ce00729c

View File

@ -62,11 +62,21 @@ module Homebrew extend self
end
end
def check_cellar
FileUtils.mkdir_p HOMEBREW_CELLAR if not File.exist? HOMEBREW_CELLAR
rescue
raise <<-EOS.undent
Could not create #{HOMEBREW_CELLAR}
Check you have permission to write to #{HOMEBREW_CELLAR.parent}
EOS
end
def perform_preinstall_checks
check_ppc
check_writable_install_location
check_cc
check_macports
check_cellar
end
def install_formulae formulae