dev-cmd/prof: bleed less of the environment from gem installs

This commit is contained in:
Bo Anderson 2023-08-21 14:22:47 +01:00
parent 3cd72905ce
commit fe8f6dfc8d
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65

View File

@ -22,7 +22,7 @@ module Homebrew
def prof
args = prof_args.parse
Homebrew.install_bundler_gems!(groups: ["prof"])
Homebrew.install_bundler_gems!(groups: ["prof"], setup_path: false)
brew_rb = (HOMEBREW_LIBRARY_PATH/"brew.rb").resolved_path
FileUtils.mkdir_p "prof"
@ -40,6 +40,8 @@ module Homebrew
raise UsageError, "`#{cmd}` is an unknown command!"
end
Homebrew.setup_gem_environment!
if args.stackprof?
with_env HOMEBREW_STACKPROF: "1" do
system(*HOMEBREW_RUBY_EXEC_ARGS, brew_rb, *args.named)