Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Aug 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion Library/Homebrew/dev-cmd/prof.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
def prof
args = prof_args.parse

Homebrew.install_bundler_gems!(groups: ["prof"])
Homebrew.install_bundler_gems!(groups: ["prof"], setup_path: false)

Check warning on line 25 in Library/Homebrew/dev-cmd/prof.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/dev-cmd/prof.rb#L25

Added line #L25 was not covered by tests

brew_rb = (HOMEBREW_LIBRARY_PATH/"brew.rb").resolved_path
FileUtils.mkdir_p "prof"
Expand All @@ -40,6 +40,8 @@
raise UsageError, "`#{cmd}` is an unknown command!"
end

Homebrew.setup_gem_environment!

Check warning on line 43 in Library/Homebrew/dev-cmd/prof.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/dev-cmd/prof.rb#L43

Added line #L43 was not covered by tests

if args.stackprof?
with_env HOMEBREW_STACKPROF: "1" do
system(*HOMEBREW_RUBY_EXEC_ARGS, brew_rb, *args.named)
Expand Down