aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/exceptions.rb
diff options
context:
space:
mode:
authorMax Howell2012-03-07 11:16:27 +0000
committerMax Howell2012-03-07 12:33:47 +0000
commit76aa0a62f3ef3bbb31c2688037e3932b80aff7f9 (patch)
treeac2283a054fc5efc6eb2fb883432039a80fee9ad /Library/Homebrew/exceptions.rb
parent15a70c36d0267af15f1c28c45a8a1bcd0c7b783f (diff)
downloadbrew-76aa0a62f3ef3bbb31c2688037e3932b80aff7f9.tar.bz2
Stop supporting `brew install --force'
Rationale: it breaks stuff. You should not be able to install over something already installed *and* linked. brew now prompts you to unlink the existing linked keg first. I came to fix this because I discovered that `brew install foo` works without --force provided foo's formula version is different to that which is installed and linked. I'm not sure if this was intentionally broken, but it led to at least two tickets I found where people were getting crazy issues trying to install over the top of already installed previous versions. So I also fixed a whole category of other issues, mostly by moving error handling into FormulaInstaller. Now error's can be caught in Homebrew.install and handled on a formula-by-formula basis. I will next port this behaviour to upgrade.
Diffstat (limited to 'Library/Homebrew/exceptions.rb')
-rw-r--r--Library/Homebrew/exceptions.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb
index 6db601fe1..df334582c 100644
--- a/Library/Homebrew/exceptions.rb
+++ b/Library/Homebrew/exceptions.rb
@@ -42,10 +42,7 @@ module Homebrew
end
end
-class FormulaAlreadyInstalledError < Homebrew::InstallationError
- def message
- "Formula already installed: #{formula}"
- end
+class CannotInstallFormulaError < RuntimeError
end
class FormulaInstallationAlreadyAttemptedError < Homebrew::InstallationError