diff options
| author | Mike McQuaid | 2015-08-27 13:39:29 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2015-08-27 13:41:06 +0100 |
| commit | 59bd08e9927f35e1de5e1ae67b1394884213fde1 (patch) | |
| tree | 3abaf36b5be8abc5c8f4ba9841c4005093543353 /Library | |
| parent | 451c69d9bdf48e0356d34d4844c5b36013b1af59 (diff) | |
| download | brew-59bd08e9927f35e1de5e1ae67b1394884213fde1.tar.bz2 | |
pull: more formulae fetch outside of main loop.
Closes Homebrew/homebrew#43313.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/pull.rb | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Library/Homebrew/cmd/pull.rb b/Library/Homebrew/cmd/pull.rb index 35576fee0..edb905a36 100644 --- a/Library/Homebrew/cmd/pull.rb +++ b/Library/Homebrew/cmd/pull.rb @@ -198,22 +198,6 @@ module Homebrew end end - bintray_fetch_formulae.each do |f| - max_retries = 5 - retry_count = 0 - begin - success = system "brew", "fetch", "--force-bottle", f.full_name - raise "Failed to download #{f} bottle!" unless success - rescue RuntimeError => e - retry_count += 1 - raise e if retry_count >= max_retries - sleep_seconds = 2**retry_count - ohai "That didn't work; sleeping #{sleep_seconds} seconds and trying again..." - sleep sleep_seconds - retry - end - end - ohai "Patch changed:" safe_system "git", "diff-tree", "-r", "--stat", revision, "HEAD" @@ -225,5 +209,21 @@ module Homebrew end end end + + bintray_fetch_formulae.each do |f| + max_retries = 5 + retry_count = 0 + begin + success = system "brew", "fetch", "--force-bottle", f.full_name + raise "Failed to download #{f} bottle!" unless success + rescue RuntimeError => e + retry_count += 1 + raise e if retry_count >= max_retries + sleep_seconds = 2**retry_count + ohai "That didn't work; sleeping #{sleep_seconds} seconds and trying again..." + sleep sleep_seconds + retry + end + end end end |
