Allow brew install --force again

This commit is contained in:
Max Howell 2011-09-01 10:27:47 +01:00
parent abc8c2f9d7
commit d5071d5ded

View File

@ -13,7 +13,7 @@ module Homebrew extend self
if File.directory? HOMEBREW_REPOSITORY/"Library/LinkedKegs/#{f.name}" if File.directory? HOMEBREW_REPOSITORY/"Library/LinkedKegs/#{f.name}"
raise "#{f} already installed\nTry: brew upgrade #{f}" raise "#{f} already installed\nTry: brew upgrade #{f}"
end end
end end unless ARGV.force?
if Process.uid.zero? and not File.stat(HOMEBREW_BREW_FILE).uid.zero? if Process.uid.zero? and not File.stat(HOMEBREW_BREW_FILE).uid.zero?
# note we only abort if Homebrew is *not* installed as sudo and the user # note we only abort if Homebrew is *not* installed as sudo and the user