Skip to content
Snippets Groups Projects
Commit 10f2a502 authored by Bo Anderson's avatar Bo Anderson
Browse files

dev-cmd/prof: improve arg passing

parent df16e9f2
No related branches found
No related tags found
No related merge requests found
......@@ -8,20 +8,19 @@ module Homebrew
def prof_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`prof` <command>
`prof` [<command>]
Run Homebrew with the Ruby profiler, e.g. `brew prof readall`.
EOS
min_named 1
end
end
def prof
prof_args.parse
args = prof_args.parse
Homebrew.install_gem_setup_path! "ruby-prof", version: "0.18.0"
FileUtils.mkdir_p "prof"
brew_rb = (HOMEBREW_LIBRARY_PATH/"brew.rb").resolved_path
safe_system "ruby-prof", "--printer=multi", "--file=prof", brew_rb, "--", *ARGV
safe_system "ruby-prof", "--printer=multi", "--file=prof", brew_rb, "--", *args.named
end
end
......@@ -966,7 +966,7 @@ Apply the bottle commit and publish bottles to Bintray.
* `--root-url`:
Use the specified *`URL`* as the root of the bottle's URL instead of Homebrew's default.
### `prof` *`command`*
### `prof` [*`command`*]
Run Homebrew with the Ruby profiler, e.g. `brew prof readall`.
......
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BREW\-CASK" "1" "July 2020" "Homebrew" "brew-cask"
.TH "BREW\-CASK" "1" "August 2020" "Homebrew" "brew-cask"
.
.SH "NAME"
\fBbrew\-cask\fR \- a friendly binary installer for macOS
......
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BREW" "1" "July 2020" "Homebrew" "brew"
.TH "BREW" "1" "August 2020" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\fR \- The Missing Package Manager for macOS
......@@ -1285,7 +1285,7 @@ Upload to the specified Bintray organisation (default: \fBhomebrew\fR)\.
\fB\-\-root\-url\fR
Use the specified \fIURL\fR as the root of the bottle\'s URL instead of Homebrew\'s default\.
.
.SS "\fBprof\fR \fIcommand\fR"
.SS "\fBprof\fR [\fIcommand\fR]"
Run Homebrew with the Ruby profiler, e\.g\. \fBbrew prof readall\fR\.
.
.SS "\fBrelease\-notes\fR [\fIoptions\fR] [\fIprevious_tag\fR] [\fIend_ref\fR]"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment