Merge pull request #14207 from apainintheneck/cleanup-brew-prof

Cleanup `brew prof`
This commit is contained in:
Kevin 2022-12-06 19:07:17 -08:00 committed by GitHub
commit fd8aaa49fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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