From 558e9bac55b3b2f87074e7576e5a00046f5b8460 Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Wed, 4 Sep 2024 14:54:15 +0100 Subject: [PATCH] startup/bootsnap: base key on in install state rather than projection --- Library/Homebrew/startup/bootsnap.rb | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Library/Homebrew/startup/bootsnap.rb b/Library/Homebrew/startup/bootsnap.rb index 6148c71272..01a9a662ea 100644 --- a/Library/Homebrew/startup/bootsnap.rb +++ b/Library/Homebrew/startup/bootsnap.rb @@ -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