4632 Commits

Author SHA1 Message Date
Maxim Belkin
7c4b1841bc
Use set -e/set +e instead of odie 2020-11-20 18:02:22 -06:00
Mike McQuaid
f42cbebd48
Merge remote-tracking branch 'origin/master' into metacollin/master 2020-11-20 12:45:21 +00:00
Mike McQuaid
c4cc8da39a
cmd/search.rb: add commented-out deprecation. 2020-11-20 12:43:51 +00:00
Mike McQuaid
2a29715042
cmd/formulae.sh: improve and refactor. 2020-11-20 12:43:38 +00:00
Markus Reiter
9140b21d80 Support --cask flag in brew info. 2020-11-20 10:36:15 +01:00
Markus Reiter
7dd7d69cd8
Merge pull request #9207 from reitermarkus/brew-zap
Add `--zap` flag for `brew uninstall`.
2020-11-20 09:42:13 +01:00
Markus Reiter
bf486c5397
Merge pull request #9212 from reitermarkus/brew-cask-fetch
Support casks in `brew fetch`.
2020-11-20 09:32:13 +01:00
metacollin
7b67c000b0 Fix docs 2020-11-19 20:50:34 -07:00
metacollin
e428ca55be Removed escape \ in front of commands 2020-11-19 20:43:09 -07:00
metacollin
917b4b964f Declare local variables seperately, split up line for readability. 2020-11-19 20:33:18 -07:00
metacollin
7102cc84b9 Documentation wording fixes 2020-11-19 20:27:19 -07:00
metacollin
87ff28431f Merge branch 'master' of https://github.com/Homebrew/brew 2020-11-19 20:18:12 -07:00
metacollin
c176f28f39 Added fixes. 2020-11-19 20:18:08 -07:00
Markus Reiter
6d850a97a1
Merge pull request #9182 from reitermarkus/formula-installer
Refactor `FormulaInstaller`.
2020-11-19 20:18:57 +01:00
Markus Reiter
7a83f34dd1 Support casks in brew fetch. 2020-11-19 19:46:59 +01:00
Maxim Belkin
22bc5a94e7
Properly handle outdated cURL
`HOMEBREW_CURL_PATH` has an effect only when `HOMEBREW_DEVELOPER` is set. However, the part of `brew.sh` that prints a message about outdated cURL disregards the value of `HOMEBREW_DEVELOPER`, which leads to a misleadnig message telling the user that `HOMEBREW_CURL_PATH` is outdated even though another cURL was used/tested.

This PR fixes it and instructs Homebrew to:

1. Display a warning message when system cURL is outdated and either `HOMEBREW_CURL_PATH` **or `HOMEBREW_DEVELOPER`** are not set. New `HOMEBREW_CURL_WARNING` variable is set to display the above warning only once (useful when `brew` calls itself internally).
2. Display `Installing Homebrew cURL` before auto-installing cURL in `update.sh` (due to `HOMEBREW_FORCE_BREWED_CURL`) and stop/exit if this step fails.
3. Display `Installing Homebrew Git` before auto-installing Git in `update.sh` (due to `HOMEBREW_FORCE_BREWED_GIT`) and stop/exit if this step fails.
2020-11-19 10:14:10 -06:00
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