diff options
author | Andre Arko <andre@arko.net> | 2016-10-07 22:39:07 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2016-10-07 22:39:07 -0700 |
commit | f16ce5717c9739c4a543d311471dc2e74f4ad5a7 (patch) | |
tree | bc9b07f9f3089830fcd06a730de07e58fae92070 /lib/bundler/compact_index_client | |
parent | fe864e24c6fc8bc7bb0dac10a85d955e6a3adc2f (diff) | |
download | bundler-f16ce5717c9739c4a543d311471dc2e74f4ad5a7.tar.gz |
unless var.nil? → if var
Diffstat (limited to 'lib/bundler/compact_index_client')
-rw-r--r-- | lib/bundler/compact_index_client/updater.rb | 4 |
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 185ebc86..b407c640 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 |