Merge pull request #18246 from Homebrew/bootsnap-key-tweak

This commit is contained in:
Mike McQuaid 2024-09-04 15:26:21 +01:00 committed by GitHub
commit 61e84834c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,14 +11,11 @@ module Homebrew
require "digest/sha2"
checksum = Digest::SHA256.new
begin
checksum.file(HOMEBREW_LIBRARY_PATH/"Gemfile.lock")
rescue SystemCallError
# If it's inaccessible, let's just assume it's empty.
end
checksum << user_gem_groups.join(",")
checksum << RUBY_VERSION
checksum << RUBY_PLATFORM
checksum << Dir.children(File.join(Gem.paths.path, "gems")).join(",")
"#{RUBY_VERSION}-#{checksum}"
checksum.hexdigest
end
end
end