From a0b940acb775b4affebedea800541f343aac79bf Mon Sep 17 00:00:00 2001 From: Max Howell Date: Thu, 15 Sep 2011 10:57:03 +0100 Subject: Check Cellar can be made before installing stuff Refs #5188. --- Library/Homebrew/cmd/install.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Library') 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 -- cgit v1.2.3