Commit Graph
122 Commits
Author SHA1 Message Date
Markus Reiter 0184e271d8 Fix RuboCop offenses. 2020-11-17 11:09:55 +01:00
Markus ReiterandGitHub 9f458142b7 Merge pull request #9146 from reitermarkus/upgrade
Mention `--greedy` when no casks were upgraded.
2020-11-16 22:03:10 +01:00
Markus Reiter 3ee66d8c0d Add type annotations related to upgrade. 2020-11-16 19:45:15 +01:00
EricFromCanada f784b7107f manpage: fixes for grammar 2020-11-16 07:56:50 -05:00
EricFromCanada eb16624c5f manpage: reformat lists of subcommands & env vars
Modify parser.rb to add a colon between each term and the line break, which `ronn` converts into a definition list.
The <br> that follows ensures each term description is on a new line in the manpage output, and also replaces the
double trailing space for generating the hard return that follows each term in the HTML output.
Also modify man.rb to print environment variables with list markup matching the cask commands, and then drop
trailing colons from both lists of terms (cask commands, env vars) and non-list terms (analytics, bundle, services;
a <br> is added here because it would prevent the term description from being indented in the manpage output).
https://docs.brew.sh/Manpage#cask-command-options-cask
2020-11-16 07:56:50 -05:00
Markus Reiter da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Jonathan Chang ab7b757400 rubocop: fix Style/NegatedIfElseCondition 2020-11-10 23:28:31 +11:00
EricFromCanada 3768b7a6e9 apidoc: update comment wording, punctuation, formatting 2020-11-06 00:21:02 -05:00
Mike McQuaid 438874af3c list: more parameters fixes.
- Remove incorrect `--formula` requirements.
- Fix bad `OptionConstraintError` output message.

Fixes #9037.
2020-11-03 16:50:03 +00:00
Mike McQuaid 5adb76a5ba list: fix flag handling.
Fix `-1` and other flags so they're handled correctly with casks. Use
the "right" exceptions for declaring invalid combinations and change
their parent class so that `--help` is printed nicely too.

Fixes #9033
2020-11-03 12:29:58 +00:00
Mike McQuaidandGitHub 60046ac41c Merge pull request #8893 from whoiswillma/william/integrate-brew-info
cmd/info: Add support for casks in brew info
2020-10-26 11:59:53 +00:00
William Ma a463348631 cli/named_args: Rename method to be more consistent 2020-10-12 09:22:29 -04:00
William Ma 4c36cf2e8e cmd/info: Add --json=v2 for outputing formula and cask json 2020-10-10 16:34:01 -04:00
Markus Reiter 61b79318ed Move include Kernel into .rbi files again and split up existing .rbi files. 2020-10-10 19:10:58 +02:00
Markus Reiter 24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
William Ma 9a8f4c7c96 cmd/info: Add support for casks 2020-10-09 19:57:48 -04:00
Markus Reiter e117a68f42 Force brew upgrade to treat arguments as casks if --cask is passed. 2020-10-08 13:43:15 +02:00
Markus Reiter d6b563e752 Support min_named :formula_or_cask. 2020-10-08 11:12:17 +02:00
Markus Reiter 7743fed77b Add “GLOBAL CASK OPTIONS” section to man page. 2020-10-08 11:07:35 +02:00
Markus Reiter 727d854621 Add missing variable. 2020-10-08 11:07:35 +02:00
Markus Reiter 994e95e356 Refactor usage of NamedArgs in brew install. 2020-10-08 11:07:35 +02:00
Markus Reiter e40eece17b Add cask options to brew reinstall. 2020-10-08 11:06:04 +02:00
Markus Reiter 2ee30b8067 Refactor MinNamedArgumentsError and MaxNamedArgumentsError. 2020-10-08 11:06:04 +02:00
Markus Reiter 5f005f67cf Refactor global Cask::Config. 2020-10-01 00:57:10 +02:00
Markus Reiter d443afc82d Improve brew man output. 2020-09-27 22:54:57 +02:00
Markus Reiter f54b458cda Allow installing casks with brew install. 2020-09-27 22:53:32 +02:00
Markus Reiter 37ecdb28f7 Add spec for NamedArgs#to_paths. 2020-09-09 22:15:10 +02:00
Markus Reiter 2a63ba4060 Support passing casks in brew style. 2020-09-09 22:15:10 +02:00
Misty De Meo c06848c487 Fix printing MultipleVersionsInstalledError details
The refactor in 6e8f5d0958 means that the
exception no longer exposes the name of the package with multiple versions,
and as a result the rescuer is unable to print this information.

Because we now have a path in which MultipleVersionsInstalledError doesn't
have the name at all, we can't reasonably restore the old behaviour.
And since rack resolution happens purely internal to the function that
raises the exception, the caller has no way to know what name to use.
However, since the exception text gets printed anyway, we can just move
this text into the exception itself.

Fixes the following error:

```
Error: mpd has multiple installed versions
Error: undefined method `name' for #<MultipleVersionsInstalledError:0x00007fc6009d8870>
/usr/local/Homebrew/Library/Homebrew/cmd/uninstall.rb:137:in `rescue in uninstall'
/usr/local/Homebrew/Library/Homebrew/cmd/uninstall.rb:135:in `uninstall'
/usr/local/Homebrew/Library/Homebrew/brew.rb:119:in `<main>'
```
2020-09-09 11:56:53 -07:00
Mike McQuaid 2e5272d04c Deprecate/disable code for Homebrew 2.5.0.
Do the usual "disable deprecations" and "uncomment pending deprecations"
dance and delete/deprecate/disable relevant/related code.
2020-09-03 10:34:22 +01:00
Seeker 5acdcd26d0 formula: rename installed_prefix to latest_installed_prefix 2020-09-01 09:32:32 -07:00
Mike McQuaid 344d8432d2 cli/named_args: handle missing cask tap.
Casks (and indeed formulae) don't always have taps.

Fixes #8535
2020-09-01 08:50:56 +01:00
Claudia 7d09ddc3b5 Print meaningful message on missing formula
Add an import statement needed for `MissingFormula` to be found.

Fixes #8538.

Reported-by: Nate Whetsell <nathan.whetsell@gmail.com>
2020-08-30 17:43:54 +02:00
Markus Reiter 46a93ee7bb Don't output warning to stdout. 2020-08-29 20:24:08 +02:00
Mike McQuaidandGitHub 3866c0b047 Merge pull request #8483 from whoiswillma/print-correct-cask-ref
cli/named_args: Print correct cask ref when name is loaded as formula/keg
2020-08-27 08:39:14 +01:00
Markus Reiter ceeb6e6492 Document NamedArgs. 2020-08-26 03:13:58 +02:00
William Ma d32be75ec0 named args: Print correct cask ref when name is resolved as formula/keg 2020-08-25 11:57:01 -04:00
William Ma b4ee7a691c args: Comment out deprecations 2020-08-23 09:02:25 -04:00
William Ma fa7bd3bff6 args: Migrate usage of args loading methods to args.named 2020-08-23 09:02:20 -04:00
Bo Anderson e3372e2a14 Lazily require some heavy files 2020-08-20 02:05:17 +01:00
Mike McQuaid 3a91c37e66 Fix RuboCop checks. 2020-08-19 17:12:32 +01:00
William Ma a7b063efb5 named_args: Warn when cask with same name exists 2020-08-17 13:06:47 -04:00
Mike McQuaidandGitHub c565a2130e Merge pull request #8332 from MLH-Fellowship/named-args
args: Move named args parsing to separate class
2020-08-17 15:15:26 +01:00
Markus Reiter 4c833b241d Fix parsing of negative options. 2020-08-14 20:03:15 +02:00
William Ma 13bc69385c args: Move named args parsing to separate class 2020-08-14 13:49:03 -04:00
Markus Reiter b48bc316e0 Use CLI::Parser for cask commands. 2020-08-13 05:15:15 +02:00
Markus Reiter 490e503b1b Replace Homebrew.args with Context. 2020-08-06 16:13:14 +02:00
Markus Reiter 9d6350037f Use try instead of send. 2020-08-06 16:13:14 +02:00
William Ma cf961caa27 caskroom: Add --caskroom command 2020-08-03 12:35:03 -04:00
Bo Anderson 5e98d4df08 cli/parser: restore env setting for global options 2020-08-01 17:36:16 +01:00