Merge pull request #10390 from MikeMcQuaid/bootsnap_fix
Fix HOMEBREW_BOOTSNAP setup
This commit is contained in:
commit
62c8f2b0ad
@ -370,7 +370,7 @@ Sorbet/FalseSigil:
|
|||||||
- "/**/{Formula,Casks}/*.rb"
|
- "/**/{Formula,Casks}/*.rb"
|
||||||
- "**/{Formula,Casks}/*.rb"
|
- "**/{Formula,Casks}/*.rb"
|
||||||
- "Homebrew/test/**/Casks/**/*.rb"
|
- "Homebrew/test/**/Casks/**/*.rb"
|
||||||
- "Homebrew/bootsnap.rb"
|
- "Homebrew/homebrew_bootsnap.rb"
|
||||||
|
|
||||||
Sorbet/StrictSigil:
|
Sorbet/StrictSigil:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|||||||
@ -7,7 +7,21 @@
|
|||||||
raise "Needs HOMEBREW_BOOTSNAP!" unless ENV["HOMEBREW_BOOTSNAP"]
|
raise "Needs HOMEBREW_BOOTSNAP!" unless ENV["HOMEBREW_BOOTSNAP"]
|
||||||
|
|
||||||
require "rubygems"
|
require "rubygems"
|
||||||
require "bootsnap"
|
|
||||||
|
begin
|
||||||
|
require "bootsnap"
|
||||||
|
rescue LoadError
|
||||||
|
raise if ENV["HOMEBREW_BOOTSNAP_RETRY"]
|
||||||
|
|
||||||
|
Dir.chdir(HOMEBREW_LIBRARY_PATH) do
|
||||||
|
system "bundle", "install", "--standalone"
|
||||||
|
end
|
||||||
|
|
||||||
|
ENV["HOMEBREW_BOOTSNAP_RETRY"] = "1"
|
||||||
|
exec ENV["HOMEBREW_BREW_FILE"], *ARGV
|
||||||
|
end
|
||||||
|
|
||||||
|
ENV.delete("HOMEBREW_BOOTSNAP_RETRY")
|
||||||
|
|
||||||
Bootsnap.setup(
|
Bootsnap.setup(
|
||||||
cache_dir: "#{ENV["HOMEBREW_TEMP"]}/homebrew-bootsnap",
|
cache_dir: "#{ENV["HOMEBREW_TEMP"]}/homebrew-bootsnap",
|
||||||
@ -10,7 +10,7 @@ $LOAD_PATH.push HOMEBREW_LIBRARY_PATH.to_s
|
|||||||
require "vendor/bundle/bundler/setup"
|
require "vendor/bundle/bundler/setup"
|
||||||
|
|
||||||
if ENV["HOMEBREW_BOOTSNAP"]
|
if ENV["HOMEBREW_BOOTSNAP"]
|
||||||
require "bootsnap"
|
require "homebrew_bootsnap"
|
||||||
else
|
else
|
||||||
$LOAD_PATH.select! { |d| Pathname(d).directory? }
|
$LOAD_PATH.select! { |d| Pathname(d).directory? }
|
||||||
$LOAD_PATH.uniq!
|
$LOAD_PATH.uniq!
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user