mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
startup/bootsnap: raise repeated LoadError
.
If `HOMEBREW_BOOTSNAP_RETRY` was set then we should raise the `LoadError` the second time so that the failures are user visible for debugging.
This commit is contained in:
parent
c076a46c19
commit
c55a5e30dd
@ -13,13 +13,13 @@ end
|
||||
if homebrew_bootsnap_enabled
|
||||
begin
|
||||
require "bootsnap"
|
||||
rescue LoadError
|
||||
unless ENV["HOMEBREW_BOOTSNAP_RETRY"]
|
||||
Homebrew.install_bundler_gems!(groups: ["bootsnap"], only_warn_on_failure: true)
|
||||
rescue LoadError => e
|
||||
raise e if ENV["HOMEBREW_BOOTSNAP_RETRY"]
|
||||
|
||||
ENV["HOMEBREW_BOOTSNAP_RETRY"] = "1"
|
||||
exec ENV.fetch("HOMEBREW_BREW_FILE"), *ARGV
|
||||
end
|
||||
Homebrew.install_bundler_gems!(groups: ["bootsnap"], only_warn_on_failure: true)
|
||||
|
||||
ENV["HOMEBREW_BOOTSNAP_RETRY"] = "1"
|
||||
exec ENV.fetch("HOMEBREW_BREW_FILE"), *ARGV
|
||||
end
|
||||
|
||||
ENV.delete("HOMEBREW_BOOTSNAP_RETRY")
|
||||
|
Loading…
x
Reference in New Issue
Block a user