dev-cmd/prof: improve arg passing
This commit is contained in:
		
							parent
							
								
									df16e9f2de
								
							
						
					
					
						commit
						10f2a50256
					
				@ -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`.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
.\" 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
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
.\" 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]"
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user