diff options
| author | Jack Nagel | 2013-01-13 15:39:50 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-01-13 15:46:46 -0600 |
| commit | a2840225d80c042bacaf66bb66cc73c0ff01c667 (patch) | |
| tree | c12234bcbc83c884f94cbb647943cf2c862b57f3 /Library | |
| parent | 7718e9b45e71be4c05ef9c31eefcc843fa88269c (diff) | |
| download | homebrew-a2840225d80c042bacaf66bb66cc73c0ff01c667.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.rb | 6 |
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 |
