diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index ffaf34480a..7142a5fcbd 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -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