4116 Commits

Author SHA1 Message Date
Markus Reiter
70dd41cfd8 Add type signatures to BuildEnvironment. 2020-11-19 16:07:50 +01:00
Markus Reiter
2c47678b05 Add --zap flag to brew uninstall and remove brew zap. 2020-11-19 15:07:59 +01:00
Markus Reiter
f4b4fdac98 Add brew zap command. 2020-11-19 13:42:02 +01:00
Markus Reiter
5097af3b74 Support --cask flag in brew uninstall. 2020-11-18 17:30:34 +01:00
Mike McQuaid
caae165eb2
Improve brew install --quiet
- Suppress (some more) warnings when doing `brew install --quiet`
- Clarify `man brew` output that we don't suppress all warnings
  for all commands with `--quiet`

While I was doing this I noticed references to the (soon to be
deprecated) `brew switch` so:
- remove these references in `install` output
- remove a reference in the documentation
- add a comment to remind me to deprecate `brew diy`, too

Fixes #9179
2020-11-18 10:13:57 +00:00
Markus Reiter
7c5d8a5288 Refactor FormulaInstaller. 2020-11-18 09:30:11 +01:00
EricFromCanada
bcdb0c7698 upgrade: show upgradeable dependents during dry run 2020-11-17 18:26:35 -05:00
Markus Reiter
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
72bc057014 manpage: fixes for formatting 2020-11-16 08:02:50 -05:00
EricFromCanada
f784b7107f manpage: fixes for grammar 2020-11-16 07:56:50 -05:00
EricFromCanada
dd1830e1e3 info: restore printing of statistics 2020-11-13 13:58:52 -05:00
metacollin
b04a5ffa0b Turbocharged formula name completion 2020-11-13 05:36:53 -07:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Jonathan Chang
f9fec9bdc7 rubocop: fix Style/IfInsideElse 2020-11-10 23:28:31 +11:00
Jonathan Chang
ab7b757400 rubocop: fix Style/NegatedIfElseCondition 2020-11-10 23:28:31 +11:00
Mike McQuaid
2ac5cffd0d
Merge pull request #9047 from tie624/add_autoremove
Add autoremove
2020-11-06 16:47:59 +00:00
Tie
8b4197dd10 make suggestions round 2 2020-11-06 10:36:21 -05:00
Mike McQuaid
3bea3a6953
Merge pull request #9055 from EricFromCanada/apidoc-improvements
Launder comments for improved rubydoc output
2020-11-06 09:45:42 +00:00
EricFromCanada
3768b7a6e9 apidoc: update comment wording, punctuation, formatting 2020-11-06 00:21:02 -05:00
Mike McQuaid
0606c9fd82
outdated/upgrade: fix upgrade alias edge case.
If you're going to follow an alias to find the outdated formula then
ensure that the latest one isn't already installed.

Fixes https://github.com/Homebrew/homebrew-core/issues/63971
2020-11-05 20:33:51 +00:00
Tie
afd7bb8889 make suggestions 2020-11-05 12:27:22 -05:00
Tie
b5427e5095 fix style issues 2020-11-04 18:53:03 -05:00
Tie
10ae9bcde7 modify autoremove to use uninstall 2020-11-04 17:15:32 -05:00
Dawid Dziurla
0fa417706a cmd: add autoremove command 2020-11-04 17:15:32 -05:00
Tie
30a3561448 move uninstall logic to new file 2020-11-04 16:45:52 -05:00
Tie
f95e1729a2 move logic from leaves to formula 2020-11-04 16:45:14 -05:00
Mike McQuaid
1f971ba2a0
link: link kegs without formulae.
Needed for `brew diy`.

Fixes #9036
2020-11-04 08:57:30 +00: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 McQuaid
dcba99c7d1
Revert "Revert "Improve @-versioned formulae linking."" 2020-11-02 11:20:09 +00:00
Shaun Jackman
099af8cf9c
Revert "Improve @-versioned formulae linking." 2020-10-30 10:40:10 -07:00
Mike McQuaid
849034c368
Improve @-versioned formulae linking.
The way we currently handle @-versioned formulae linking is pretty
labourius:
- it requires extensive use of `link_overwrite` to avoid the `link`
  stage failing on certain install/upgrade scenarios
- we teach people to use `brew link --force` whenever they wish to
  link a versioned formulae when it's pretty obvious what's expected
  in that situation

Instead, let's:
- automatically unlink other versioned formulae when linking a
  versioned formula (either through `brew link` or `install`/`upgrade`
  /`reinstall`)
- notify the user what we've done (with the same messaging as if
  they had run `brew link` manually)
2020-10-29 13:35:03 +00:00
Mike McQuaid
f099256fef
install: tweak missing formula behaviour.
- Run `brew search` for local formulae first (as it's quickest) rather
  than checking Git history.
- Don't output `Searching taps...` because `Searching taps on GitHub...`
  is output by the called function (and because it'll say it's searching
  taps even when it is not if `HOMEBREW_NO_GITHUB_API` is set).
2020-10-26 12:18:07 +00:00
Mike McQuaid
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
e9e63db825 search: Raise exception when no formulae/casks are found; Add --pull-request switch 2020-10-14 14:40:24 -04:00
William Ma
9e9e2e63e8 search: Print error message to stderr when not using a tty 2020-10-14 13:32:09 -04:00
Mike McQuaid
a0a9fa241f
Merge pull request #8851 from Akylzhan/patch
cmd/list.rb: --formula and --cask as default option on TTY
2020-10-13 11:52:19 +01:00
William Ma
a463348631 cli/named_args: Rename method to be more consistent 2020-10-12 09:22:29 -04:00
Akylzhan Sauranbay
c8809ce730 cmd/list.rb: --formula, --cask as default on TTY outputs
cmd/list.rb: --formula, --cask as default TTY:

cmd/list.rb: proper deprecated message on non TTY outputs

update manpage

update zsh completion

updated manpages/brew.1

update tests

return list_casks

list_spec.rb: not output to stderr
2020-10-12 14:52:03 +06: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
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
Mike McQuaid
2bdf3deb6f
Reduce shallow clone usage
GitHub has requested we request our usage of shallow clones. As a
result:

- do default to shallow clones on CI
- do not do --shallow-since when setting up new repositories in
  `brew update`
- do not support shallow clones of homebrew-core at all

We may consider in future unshallowing all clones unconditionally.
2020-10-09 09:57:04 +01: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
10e3b63b7b Inline install, reinstall and upgrade options. 2020-10-08 11:33:38 +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
7f14e55f99 Add missing cask options to brew upgrade. 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