diff options
| author | Misty De Meo | 2011-11-29 10:43:02 -0600 |
|---|---|---|
| committer | Charlie Sharpsteen | 2011-11-29 09:32:05 -0800 |
| commit | d9c3f19e6a7e13081982c93ba335e23a136c688f (patch) | |
| tree | 9a136d08000b46fe201ea39da9f7a0813b6ad725 | |
| parent | 98989560476db26165eef947b96e49d508240b97 (diff) | |
| download | brew-d9c3f19e6a7e13081982c93ba335e23a136c688f.tar.bz2 | |
Fix installation error from ARGV `--HEAD` filter
The ARGV filtering would strip `--HEAD` from dependency installations,
then proceed with trying to install the dependency from the latest
version in the formula. This causes an error if the latest version is
already installed, so check to see if formula is installed before
performing the installation.
Closes Homebrew/homebrew#8869.
Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index bd7c672c3..7a2ee653c 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -33,9 +33,10 @@ class FormulaInstaller else ARGV.filter_for_dependencies do # Re-create the formula object so that args like `--HEAD` won't - # affect properties like the installation prefix. + # affect properties like the installation prefix. Also need to + # re-check installed status as the Formula may have changed. dep = Formula.factory dep.name - install_dependency dep + install_dependency dep unless dep.installed? end end end |
