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