diff options
| author | Max Howell | 2011-09-15 10:57:03 +0100 |
|---|---|---|
| committer | Max Howell | 2011-09-15 10:57:22 +0100 |
| commit | a0b940acb775b4affebedea800541f343aac79bf (patch) | |
| tree | adf886971ae136d664ce5f5438db7601e17c048e | |
| parent | 4be164a3e1231c9605802a4e7c8c7926b1ec9fb0 (diff) | |
| download | homebrew-a0b940acb775b4affebedea800541f343aac79bf.tar.bz2 | |
Check Cellar can be made before installing stuff
Refs #5188.
| -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 |
