aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-01-13 15:39:50 -0600
committerJack Nagel2013-01-13 15:46:46 -0600
commit8f88850cdb108daa4cab9805549b703376708792 (patch)
tree39a367facd6137d247b0e94b27739e1f15149e4f /Library
parent900a5fec2d5341db275bccdcd70936690a0e778c (diff)
downloadbrew-8f88850cdb108daa4cab9805549b703376708792.tar.bz2
Only mark install as attempted if it was actually attempted
Commit 30a08f5cc707 ("Don't attempt installation multiple times") was correct in raising FormulaInstallationAlreadyAttemptedError early enough to prevent the other exceptions in #check_install_sanity from being raised, but it should not have moved the point at which formulae are added to the attempted set. Doing so prevents the installer from being instantiated multiple times on the same formula, even if installation was never attempted. Put it back where it belongs.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_installer.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 897a03afe..221690576 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -20,13 +20,13 @@ class FormulaInstaller
@ignore_deps = ARGV.ignore_deps? || ARGV.interactive?
@install_bottle = install_bottle? ff
+ @@attempted ||= Set.new
+
check_install_sanity
end
def check_install_sanity
- @@attempted ||= Set.new
raise FormulaInstallationAlreadyAttemptedError, f if @@attempted.include? f
- @@attempted << f
if f.installed?
msg = "#{f}-#{f.installed_version} already installed"
@@ -116,6 +116,8 @@ class FormulaInstaller
oh1 "Installing #{Tty.green}#{f}#{Tty.reset}" if show_header
+ @@attempted << f
+
if install_bottle
pour
else