diff options
| author | Max Howell | 2011-09-15 10:57:03 +0100 |
|---|---|---|
| committer | Max Howell | 2011-09-15 10:57:22 +0100 |
| commit | 95ce00729cda1ed9aa1cf1041f3c7fdc89731d3e (patch) | |
| tree | 31b9adfc210d7b0884925f870164ee717ff0d408 /Library | |
| parent | f4c301a82765a740f0d880504f549abdbce64929 (diff) | |
| download | brew-95ce00729cda1ed9aa1cf1041f3c7fdc89731d3e.tar.bz2 | |
Check Cellar can be made before installing stuff
Refs Homebrew/homebrew#5188.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/install.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index ffaf34480..7142a5fcb 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 |
