diff options
| author | Max Howell | 2012-08-23 09:02:24 -0400 |
|---|---|---|
| committer | Max Howell | 2012-08-29 12:41:35 -0400 |
| commit | 336c4d1b05df9db2e13ffe88607f5e44493f3b8f (patch) | |
| tree | e55a4deb5c16477f435491a09ed2837855c8ce4a /Library/Homebrew | |
| parent | 20ce16a3ffd6485177121422734be0b7bba5c591 (diff) | |
| download | brew-336c4d1b05df9db2e13ffe88607f5e44493f3b8f.tar.bz2 | |
If installed but not linked, say so
Rationale: if ack is unlinked but installed, typing ack does nothing, but then user tries to install and it says it is already installed. What gives? The user thinks.
Formula ending up unlinked can happen due to failures during the link phase and we recommend unlinking formula for conflicts. So common enough to justify this amendment.
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 8e082a7ce..6e1f59633 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -24,7 +24,9 @@ class FormulaInstaller def check_install_sanity if f.installed? - raise CannotInstallFormulaError, "#{f}-#{f.installed_version} already installed" + msg = "#{f}-#{f.installed_version} already installed" + msg << ", it's just not linked" if not f.linked_keg.symlink? and not f.keg_only? + raise CannotInstallFormulaError, msg end # Building head-only without --HEAD is an error |
