Merge pull request #9298 from MikeMcQuaid/deprecation-fixes
Deprecation fixes
This commit is contained in:
commit
6936f56b13
@ -71,7 +71,7 @@ module Cask
|
|||||||
Cmd::Style => "brew style",
|
Cmd::Style => "brew style",
|
||||||
Cmd::Uninstall => "brew uninstall [--cask]",
|
Cmd::Uninstall => "brew uninstall [--cask]",
|
||||||
Cmd::Upgrade => "brew upgrade [--cask]",
|
Cmd::Upgrade => "brew upgrade [--cask]",
|
||||||
Cmd::Zap => "brew upgrade --zap [--cask]",
|
Cmd::Zap => "brew uninstall --zap [--cask]",
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
def self.parser(&block)
|
def self.parser(&block)
|
||||||
|
|||||||
@ -49,9 +49,9 @@ module Homebrew
|
|||||||
description: "Open the GitHub source page for <formula> in a browser. "\
|
description: "Open the GitHub source page for <formula> in a browser. "\
|
||||||
"To view formula history locally: `brew log -p` <formula>"
|
"To view formula history locally: `brew log -p` <formula>"
|
||||||
flag "--json",
|
flag "--json",
|
||||||
description: "Print a JSON representation of <formula>. Currently the default and only accepted "\
|
description: "Print a JSON representation. Currently the default value for <version> is `v1` for "\
|
||||||
"value for <version> is `v1`. See the docs for examples of using the JSON "\
|
"<formula>. For <formula> and <cask> use `v2`. See the docs for examples of using the "\
|
||||||
"output: <https://docs.brew.sh/Querying-Brew>"
|
"JSON output: <https://docs.brew.sh/Querying-Brew>"
|
||||||
switch "--installed",
|
switch "--installed",
|
||||||
depends_on: "--json",
|
depends_on: "--json",
|
||||||
description: "Print JSON of formulae that are currently installed."
|
description: "Print JSON of formulae that are currently installed."
|
||||||
@ -178,6 +178,8 @@ module Homebrew
|
|||||||
|
|
||||||
json = case json_version(args.json)
|
json = case json_version(args.json)
|
||||||
when :v1, :default
|
when :v1, :default
|
||||||
|
raise UsageError, "cannot specify --cask with --json=v1!" if args.cask?
|
||||||
|
|
||||||
formulae = if args.all?
|
formulae = if args.all?
|
||||||
Formula.sort
|
Formula.sort
|
||||||
elsif args.installed?
|
elsif args.installed?
|
||||||
|
|||||||
@ -222,7 +222,7 @@ If a *`formula`* or *`cask`* is provided, show summary of information about it.
|
|||||||
* `--github`:
|
* `--github`:
|
||||||
Open the GitHub source page for *`formula`* in a browser. To view formula history locally: `brew log -p` *`formula`*
|
Open the GitHub source page for *`formula`* in a browser. To view formula history locally: `brew log -p` *`formula`*
|
||||||
* `--json`:
|
* `--json`:
|
||||||
Print a JSON representation of *`formula`*. Currently the default and only accepted value for *`version`* is `v1`. See the docs for examples of using the JSON output: <https://docs.brew.sh/Querying-Brew>
|
Print a JSON representation. Currently the default value for *`version`* is `v1` for *`formula`*. For *`formula`* and *`cask`* use `v2`. See the docs for examples of using the JSON output: <https://docs.brew.sh/Querying-Brew>
|
||||||
* `--installed`:
|
* `--installed`:
|
||||||
Print JSON of formulae that are currently installed.
|
Print JSON of formulae that are currently installed.
|
||||||
* `--all`:
|
* `--all`:
|
||||||
|
|||||||
@ -274,7 +274,7 @@ Open the GitHub source page for \fIformula\fR in a browser\. To view formula his
|
|||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-json\fR
|
\fB\-\-json\fR
|
||||||
Print a JSON representation of \fIformula\fR\. Currently the default and only accepted value for \fIversion\fR is \fBv1\fR\. See the docs for examples of using the JSON output: \fIhttps://docs\.brew\.sh/Querying\-Brew\fR
|
Print a JSON representation\. Currently the default value for \fIversion\fR is \fBv1\fR for \fIformula\fR\. For \fIformula\fR and \fIcask\fR use \fBv2\fR\. See the docs for examples of using the JSON output: \fIhttps://docs\.brew\.sh/Querying\-Brew\fR
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-installed\fR
|
\fB\-\-installed\fR
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user