dev-cmd/prof: improve arg passing
This commit is contained in:
parent
df16e9f2de
commit
10f2a50256
@ -8,20 +8,19 @@ module Homebrew
|
|||||||
def prof_args
|
def prof_args
|
||||||
Homebrew::CLI::Parser.new do
|
Homebrew::CLI::Parser.new do
|
||||||
usage_banner <<~EOS
|
usage_banner <<~EOS
|
||||||
`prof` <command>
|
`prof` [<command>]
|
||||||
|
|
||||||
Run Homebrew with the Ruby profiler, e.g. `brew prof readall`.
|
Run Homebrew with the Ruby profiler, e.g. `brew prof readall`.
|
||||||
EOS
|
EOS
|
||||||
min_named 1
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def prof
|
def prof
|
||||||
prof_args.parse
|
args = prof_args.parse
|
||||||
|
|
||||||
Homebrew.install_gem_setup_path! "ruby-prof", version: "0.18.0"
|
Homebrew.install_gem_setup_path! "ruby-prof", version: "0.18.0"
|
||||||
FileUtils.mkdir_p "prof"
|
FileUtils.mkdir_p "prof"
|
||||||
brew_rb = (HOMEBREW_LIBRARY_PATH/"brew.rb").resolved_path
|
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
|
||||||
end
|
end
|
||||||
|
|||||||
@ -966,7 +966,7 @@ Apply the bottle commit and publish bottles to Bintray.
|
|||||||
* `--root-url`:
|
* `--root-url`:
|
||||||
Use the specified *`URL`* as the root of the bottle's URL instead of Homebrew's default.
|
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`.
|
Run Homebrew with the Ruby profiler, e.g. `brew prof readall`.
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
.\" generated with Ronn/v0.7.3
|
.\" generated with Ronn/v0.7.3
|
||||||
.\" http://github.com/rtomayko/ronn/tree/0.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"
|
.SH "NAME"
|
||||||
\fBbrew\-cask\fR \- a friendly binary installer for macOS
|
\fBbrew\-cask\fR \- a friendly binary installer for macOS
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
.\" generated with Ronn/v0.7.3
|
.\" generated with Ronn/v0.7.3
|
||||||
.\" http://github.com/rtomayko/ronn/tree/0.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"
|
.SH "NAME"
|
||||||
\fBbrew\fR \- The Missing Package Manager for macOS
|
\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
|
\fB\-\-root\-url\fR
|
||||||
Use the specified \fIURL\fR as the root of the bottle\'s URL instead of Homebrew\'s default\.
|
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\.
|
Run Homebrew with the Ruby profiler, e\.g\. \fBbrew prof readall\fR\.
|
||||||
.
|
.
|
||||||
.SS "\fBrelease\-notes\fR [\fIoptions\fR] [\fIprevious_tag\fR] [\fIend_ref\fR]"
|
.SS "\fBrelease\-notes\fR [\fIoptions\fR] [\fIprevious_tag\fR] [\fIend_ref\fR]"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user