diff --git a/Library/Homebrew/dev-cmd/prof.rb b/Library/Homebrew/dev-cmd/prof.rb index 6457c08f60..b33bc82bfb 100644 --- a/Library/Homebrew/dev-cmd/prof.rb +++ b/Library/Homebrew/dev-cmd/prof.rb @@ -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)