aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd/pull.rb
diff options
context:
space:
mode:
authorMarkus Reiter2016-09-24 17:38:49 +0200
committerGitHub2016-09-24 17:38:49 +0200
commite2c7509065d8cd6fd76cd631f5c8d1068df49cad (patch)
tree03eee4f10d15a33674735be36d0939da964ab60c /Library/Homebrew/dev-cmd/pull.rb
parenteb3b94d94a7329d92171b75ea163f139cbf71aa6 (diff)
parent58e36c73193befb57d351344cea2a4a33fef850d (diff)
downloadbrew-e2c7509065d8cd6fd76cd631f5c8d1068df49cad.tar.bz2
Merge pull request #1113 from reitermarkus/rubocop-guardclause
RuboCop: Fix Style/GuardClause.
Diffstat (limited to 'Library/Homebrew/dev-cmd/pull.rb')
-rw-r--r--Library/Homebrew/dev-cmd/pull.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/Library/Homebrew/dev-cmd/pull.rb b/Library/Homebrew/dev-cmd/pull.rb
index b06719fb1..857c55993 100644
--- a/Library/Homebrew/dev-cmd/pull.rb
+++ b/Library/Homebrew/dev-cmd/pull.rb
@@ -531,19 +531,19 @@ module Homebrew
req = Net::HTTP::Head.new bottle_info.url
req.initialize_http_header "User-Agent" => HOMEBREW_USER_AGENT_RUBY
res = http.request req
- if res.is_a?(Net::HTTPSuccess)
- break
- elsif res.is_a?(Net::HTTPClientError)
- if retry_count >= max_retries
- raise "Failed to find published #{f} bottle at #{url}!"
- end
- print(wrote_dots ? "." : "Waiting on Bintray.")
- wrote_dots = true
- sleep poll_retry_delay_seconds
- retry_count += 1
- else
+ break if res.is_a?(Net::HTTPSuccess)
+
+ unless res.is_a?(Net::HTTPClientError)
raise "Failed to find published #{f} bottle at #{url} (#{res.code} #{res.message})!"
end
+
+ if retry_count >= max_retries
+ raise "Failed to find published #{f} bottle at #{url}!"
+ end
+ print(wrote_dots ? "." : "Waiting on Bintray.")
+ wrote_dots = true
+ sleep poll_retry_delay_seconds
+ retry_count += 1
end
end