Merge pull request #18246 from Homebrew/bootsnap-key-tweak
This commit is contained in:
commit
61e84834c7
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user