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

cli/parser: chomp '=' from comma_array flag name #7184

Merged
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions Library/Homebrew/cli/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def usage_banner_text
end

def comma_array(name, description: nil)
name = name.chomp "="
description = option_to_description(name) if description.nil?
process_option(name, description)
@parser.on(name, OptionParser::REQUIRED_ARGUMENT, Array, *wrap_option_desc(description)) do |list|
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/dev-cmd/bump-formula-pr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def bump_formula_pr_args
description: "Print the pull request URL instead of opening in a browser."
switch "--no-fork",
description: "Don't try to fork the repository."
comma_array "--mirror=",
comma_array "--mirror",
description: "Use the specified <URL> as a mirror URL. If <URL> is a comma-separated list "\
"of URLs, multiple mirrors will be added."
flag "--version=",
Expand Down
8 changes: 5 additions & 3 deletions docs/Manpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -1015,16 +1015,16 @@ Install macOS applications distributed as binaries. See `brew-cask`(1).

### `bundle` *`subcommand`*

Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask and the Mac App
Store.
Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask, Mac App Store
and Whalebrew.

`brew bundle` [`install`]

Install or upgrade all dependencies in a `Brewfile`.

`brew bundle dump`

Write all installed casks/formulae/taps into a `Brewfile`.
Write all installed casks/formulae/images/taps into a `Brewfile`.

`brew bundle cleanup`

Expand Down Expand Up @@ -1065,6 +1065,8 @@ dependencies are listed.
`list` tap dependencies.
* `--mas`:
`list` Mac App Store dependencies.
* `--whalebrew`:
`list` Whalebrew dependencies.
* `--describe`:
`dump` a description comment above each line, unless the dependency does not have a description.
* `--no-restart`:
Expand Down
8 changes: 6 additions & 2 deletions manpages/brew.1
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,7 @@ Install macOS applications distributed as binaries\. See \fBbrew\-cask\fR(1)\.
\fIhttps://github\.com/Homebrew/homebrew\-cask\fR
.
.SS "\fBbundle\fR \fIsubcommand\fR"
Bundler for non\-Ruby dependencies from Homebrew, Homebrew Cask and the Mac App Store\.
Bundler for non\-Ruby dependencies from Homebrew, Homebrew Cask, Mac App Store and Whalebrew\.
.
.P
\fBbrew bundle\fR [\fBinstall\fR]
Expand All @@ -1302,7 +1302,7 @@ Install or upgrade all dependencies in a \fBBrewfile\fR\.
\fBbrew bundle dump\fR
.
.P
Write all installed casks/formulae/taps into a \fBBrewfile\fR\.
Write all installed casks/formulae/images/taps into a \fBBrewfile\fR\.
.
.P
\fBbrew bundle cleanup\fR
Expand Down Expand Up @@ -1373,6 +1373,10 @@ Read the \fBBrewfile\fR from \fB~/\.Brewfile\fR\.
\fBlist\fR Mac App Store dependencies\.
.
.TP
\fB\-\-whalebrew\fR
\fBlist\fR Whalebrew dependencies\.
.
.TP
\fB\-\-describe\fR
\fBdump\fR a description comment above each line, unless the dependency does not have a description\.
.
Expand Down