diff options
| author | Charlie Sharpsteen | 2012-09-24 16:29:29 -0500 | 
|---|---|---|
| committer | Charlie Sharpsteen | 2012-09-24 16:29:29 -0500 | 
| commit | 96905ebc241d13b01a32f861eeb24a36e8303fe0 (patch) | |
| tree | b758407ff7cd834173fbc063611af57ac4c8020f | |
| parent | 94dbaf00d104cd462a98da1efa22a8bc936efa6c (diff) | |
| download | homebrew-96905ebc241d13b01a32f861eeb24a36e8303fe0.tar.bz2 | |
Abort if the HOMEBREW_PREFIX is not searchable
Without executable permissions on the prefix directory, permissions tests such
as `File.writable?` will fail and `File.chdir` will die with a strange error.
Fixes #14996.
| -rw-r--r-- | install | 8 | 
1 files changed, 8 insertions, 0 deletions
| @@ -89,6 +89,14 @@ It appears Homebrew is already installed. If your intent is to reinstall you  should do the following before running this installer again:      rm -rf #{HOMEBREW_PREFIX}/Cellar #{HOMEBREW_PREFIX}/.git && brew cleanup  EOABORT +# Tests will fail if the prefix exists, but we don't have execution +# permissions. Abort in this case. +abort <<-EOABORT if File.directory? HOMEBREW_PREFIX and not File.executable? HOMEBREW_PREFIX +The Homeprew prefix, #{HOMEBREW_PREFIX}, exists but is not searchable. If this is +not intentional, please restore the default permissions and try running the +installer again: +    sudo chmod 755 #{HOMEBREW_PREFIX} +EOABORT  ohai "This script will install:"  puts "#{HOMEBREW_PREFIX}/bin/brew" | 
