Skip to content

Commit

Permalink
Make Digest subclass lookup thread-save
Browse files Browse the repository at this point in the history
  • Loading branch information
baurmatt committed Aug 27, 2019
1 parent 20924b4 commit 99fe4cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/r10k/forge/module_release.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def download
def verify
logger.debug1 "Verifying that #{@tarball_cache_path} matches checksum"

sha256_of_tarball = Digest::SHA256.file(@tarball_cache_path).hexdigest
sha256_of_tarball = Digest(:SHA256).file(@tarball_cache_path).hexdigest

if @sha256_file_path.exist?
verify_from_file(sha256_of_tarball, @sha256_file_path)
Expand All @@ -130,7 +130,7 @@ def verify
end

logger.debug1 "No SHA256 checksum available, falling back to MD5"
md5_of_tarball = Digest::MD5.file(@tarball_cache_path).hexdigest
md5_of_tarball = Digest(:MD5).file(@tarball_cache_path).hexdigest
if @md5_file_path.exist?
verify_from_file(md5_of_tarball, @md5_file_path)
else
Expand Down

0 comments on commit 99fe4cd

Please sign in to comment.