summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHomu <homu@barosl.com>2016-04-29 23:58:28 +0900
committerSamuel Giddins <segiddins@segiddins.me>2016-04-30 02:04:04 -0500
commitc75caa0d8050d18cc43dac05c98ca8945206e49d (patch)
tree7eb22ebd098a5f2dadbc76957b2cd661d1a07027
parent83dff707746e77123fb0736dab08260f8126db25 (diff)
downloadbundler-c75caa0d8050d18cc43dac05c98ca8945206e49d.tar.gz
Auto merge of #4486 - bundler:seg-updater-read-comment, r=segiddins
[Updater] Add a comment why we use IO.read
-rw-r--r--lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb b/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb
index 6142afb7c5..f19b1df3d7 100644
--- a/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb
+++ b/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb
@@ -61,6 +61,9 @@ class Bundler::CompactIndexClient
def checksum_for_file(path)
return nil unless path.file?
+ # This must use IO.read instead of Digest.file().hexdigest
+ # because we need to preserve \n line endings on windows when calculating
+ # the checksum
Digest::MD5.hexdigest(IO.read(path))
end
end