Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions lib/omnibus/fetchers/net_fetcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,16 @@
#
def verify_checksum!
log.info(log_key) { "Verifying checksum" }


# Check if the source is a Git repository
if source[:url] =~ /git@|https?:\/\/.*\.git/
log.warn(log_key) { "Skipping checksum verification for Git source: #{source[:url]}" }
return
end

expected = checksum
actual = digest(downloaded_file, digest_type)

if expected != actual
raise ChecksumMismatch.new(self, expected, actual)
end
Expand Down