Skip to content

Commit

Permalink
Check Cellar can be made before installing stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Sep 15, 2011
1 parent 4be164a commit a0b940a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Library/Homebrew/cmd/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,21 @@ def check_macports
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
Expand Down

0 comments on commit a0b940a

Please sign in to comment.