Fix brew prof --stackprof

The `stackprof` gem wasn't being included
correctly because it was missing the path
directory. This vendored gems path is added
later on in `load_path.rb`.

We export the GEM_PATH and GEM_HOME environment
variables in setup_gem_environment! so we
can use that information if we require the
`rubygems` gem first.
This commit is contained in:
apainintheneck 2022-12-29 17:44:48 -08:00
parent 3a35ea3e28
commit 5708ed3171

View File

@ -2,6 +2,7 @@
# frozen_string_literal: true
if ENV["HOMEBREW_STACKPROF"]
require "rubygems"
require "stackprof"
StackProf.start(mode: :wall, raw: true)
end