summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2016-10-07 22:39:07 -0700
committerAndre Arko <andre@arko.net>2016-10-07 22:39:07 -0700
commitf16ce5717c9739c4a543d311471dc2e74f4ad5a7 (patch)
treebc9b07f9f3089830fcd06a730de07e58fae92070
parentfe864e24c6fc8bc7bb0dac10a85d955e6a3adc2f (diff)
downloadbundler-f16ce5717c9739c4a543d311471dc2e74f4ad5a7.tar.gz
unless var.nil? → if var
-rw-r--r--lib/bundler/compact_index_client/updater.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/compact_index_client/updater.rb b/lib/bundler/compact_index_client/updater.rb
index 185ebc8678..b407c64039 100644
--- a/lib/bundler/compact_index_client/updater.rb
+++ b/lib/bundler/compact_index_client/updater.rb
@@ -30,7 +30,7 @@ module Bundler
Dir.mktmpdir("bundler-compact-index-") do |local_temp_dir|
local_temp_path = Pathname.new(local_temp_dir).join(local_path.basename)
- # download new file if retrying
+ # first try to fetch any new bytes on the existing file
if retrying.nil? && local_path.file?
FileUtils.cp local_path, local_temp_path
headers["If-None-Match"] = etag_for(local_temp_path)
@@ -61,7 +61,7 @@ module Bundler
return nil
end
- unless retrying.nil?
+ if retrying
raise MisMatchedChecksumError.new(remote_path, response_etag, etag_for(local_temp_path))
end