Cleanup brew prof

- Add exception in brew.rb require check for ruby-prof
This commit is contained in:
apainintheneck 2022-12-04 20:07:31 -08:00
parent 001bacee18
commit c8f256b21d

View File

@ -7,7 +7,9 @@ if ENV["HOMEBREW_STACKPROF"]
end
raise "HOMEBREW_BREW_FILE was not exported! Please call bin/brew directly!" unless ENV["HOMEBREW_BREW_FILE"]
raise "#{__FILE__} must not be loaded via `require`." if $PROGRAM_NAME != __FILE__
if $PROGRAM_NAME != __FILE__ && !$PROGRAM_NAME.end_with?("/bin/ruby-prof")
raise "#{__FILE__} must not be loaded via `require`."
end
std_trap = trap("INT") { exit! 130 } # no backtrace thanks