4632 Commits

Author SHA1 Message Date
Bo Anderson
a6c6c4b915
cmd/update-report: fix error if new formulae/casks are already installed 2022-06-17 00:30:49 +01:00
Rylan Polster
f724dde6bb
Fix style 2022-06-16 15:37:33 -04:00
Rylan Polster
98f8a86af3
Clarify TODO in brew update
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2022-06-16 15:34:04 -04:00
Rylan Polster
cff0122fc4
Remove unnecessary HOMEBREW_INSTALL_FROM_API checks 2022-06-15 16:35:50 -04:00
Rylan Polster
1e536217b2
Streamline loading casks from API 2022-06-15 16:35:49 -04:00
hyuraku
f0d29d6d49 repair brew outdated --greedy 2022-06-15 21:53:15 +09:00
Rylan Polster
43f7fa4162
Update cached formula json file when needed 2022-06-14 16:11:23 -04:00
Rylan Polster
e53ccbc3cd
Remove unnecessary code 2022-06-14 16:06:05 -04:00
Bo Anderson
1d36c42fb7
Support offline usage under HOMEBREW_INSTALL_FROM_API 2022-06-14 16:06:05 -04:00
Mike McQuaid
78695938ae
cmd/update-report: always output new formulae.
There's near zero performance overhead and this seems good for
discovery.

Fixes #13412
2022-06-13 09:12:32 +01:00
apainintheneck
0020a57987 Split dump_formula_or_cask_report into multiple functions 2022-06-12 08:55:21 -07:00
apainintheneck
e0a6743580 HOMEBREW_UPDATE_REPORT_ALL_FORMULA displays new formulae and casks
Only show new formulae or casks when HOMEBREW_UPDATE_REPORT_ALL_FORMULAE
environment variable is set.

Stop checking for HOMEBREW_UPDATE_REPORT_ALL_FORMULAE when the key is
:R, :A or :AC in ReporterHub#dump_formula_or_cask_report because
that check is made redundant by the check in ReporterHub#dump.
2022-06-11 15:58:51 -07:00
Mike McQuaid
04c8e02418
cmd/update-report: use better wording where appropriate.
From reading https://github.com/orgs/Homebrew/discussions/3328: I
initially thought we should just change "Updated" to "Modified" when
appropriate. After conversation with Bo98, though, I thought more and
saw that we're already checking for outdated formulae here so, rather
than ever traverse through the formula history, look at the outdated
formula and list them unless we've set
`HOMEBREW_UPDATE_REPORT_ALL_FORMULAE` in which case we show the
modifications.

While we're here, also do a bit of reformatting and renaming to better
clarify intent.
2022-06-03 19:23:38 +01:00
Bo Anderson
01a93edac3
Portable Ruby 2.6.8_1 2022-06-03 18:00:16 +01:00
Mike McQuaid
fb4c9353bb
Improve updating behaviour
- Rename use of "preinstall" to "auto update". The original "preinstall"
  naming came from the fact that we used to only auto-update before
  `brew install` but now that it's many commands: this is more confusing
  than useful.
- Add `HOMEBREW_NO_UPDATE_REPORT_ONLY_INSTALLED` and remove
  `HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED`; the latter is now the default
  and the prior provides an opt-out for better output, performance and
  avoiding reading potentially untrusted formulae.
- Add `HOMEBREW_UPDATE_FORMULA_VERSION_CHECKS` and don't check formula
  versions by default for better performance by default.

Co-authored-by: Eric Knibbe <3324775+EricFromCanada@users.noreply.github.com>
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>
2022-05-19 11:04:20 -04:00
Bo Anderson
14870406e0
Merge pull request #13253 from xxyzz/delete-force-update
Add `--no-force-auto-update` option to `brew tap`
2022-05-11 03:23:17 +01:00
xxyzz
2e899da7c7
Add --no-force-auto-update option to brew tap
Enable this option to delete `homebrew.forceautoupdate` git config option
2022-05-11 07:17:17 +08:00
Alex Balgavy
b886b2d1f7
Remove mentions of nonexistent command brew diy
The output of `brew doctor` can mention a command `brew diy`, which no
longer exists.
2022-05-06 10:22:25 -04:00
Bob Lail
c715ea7fd1 Document the --quiet flag on brew update 2022-05-04 10:52:19 -05:00
Carlo Cabrera
c586aeffc8
cmd/info: use Formula.all
Fixes #13241.
2022-05-04 16:41:25 +08:00
Maxim Belkin
13735bc780
Apply Mike's suggestions from code review
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2022-04-26 08:35:28 -07:00
Maxim Belkin
27a2dba340
update/update-reset: warn when no origin remote
Current situation with update.sh & update-reset.sh:

Upon creating a new tap and before adding remote 'origin' to it,
running `brew update` produces multiple cryptic error messages.
This change converts these cryptic Git messages into clear warnings
about absent remote 'origin'.

How to test:
1. Create a new tap using `brew tap-new`
2. Run `brew update`
2022-04-26 08:35:27 -07:00
apainintheneck
f811774cab Display old and new version numbers when updating 2022-04-14 11:58:19 -07:00
EricFromCanada
8a7f082b30
list: output only if installed casks are passed
Fixes #13139.
2022-04-13 10:50:50 -04:00
Issy Long
a8ce086844
Merge pull request #13116 from issyl0/reinstall-cask-zap
cask/reinstall: Support `--zap` for entirely purging cask files
2022-04-12 10:37:58 +01:00
Issy Long
0b6b2f04da
cask/reinstall: Support --zap for entirely purging cask files
- The `brew uninstall` command has `--zap`, so let's make `brew
  reinstall` have parity here for a better user experience. (Requested
  in issue 12983.)
- It feels weird that to get my new reinstall test to pass I had to add
  `--zap` to `cask/cmd/install.rb`, not `cask/cmd/reinstall.rb` to get
  the tests to pass. But the `brew reinstall --cask caffeine --zap`
  command worked fine all the time. The CLI argument parser from the
  test run was complaining about not knowing what `zap` was. As a
  result, `--zap` now shows up as a switch in `brew install --help`
  which I'm not 100% convinced is the desired UX. But I've edited the
  description accordingly to specify that it will only work on
  `reinstall` operations (and `--zap` on `install` is a no-op).

```
issyl0 at pictor in /opt/homebrew on reinstall-cask-zap
❯ brew reinstall --cask caffeine --zap
==> Downloading https://github.com/IntelliScape/caffeine/releases/download/1.1.3/Caffeine.dmg
Already downloaded: /Users/issyl0/Library/Caches/Homebrew/downloads/3d6ccfdd3b8d0ab37d1c2468d6e69078c2d31d3b12bf51947c4db21e5f376af2--Caffeine.dmg
==> Implied `brew uninstall --cask caffeine`
==> Backing App 'Caffeine.app' up to '/opt/homebrew/Caskroom/caffeine/1.1.3/Caffeine.app'
==> Removing App '/Applications/Caffeine.app'
==> Dispatching zap stanza
==> Trashing files:
~/Library/Application Support/com.intelliscapesolutions.caffeine
~/Library/Preferences/com.intelliscapesolutions.caffeine.plist
~/Library/Caches/com.intelliscapesolutions.caffeine
~/Library/HTTPStoages/com.intelliscapesolutions.caffeine.binarycookies
==> Removing all staged versions of Cask 'caffeine'
==> Installing Cask caffeine
==> Moving App 'Caffeine.app' to '/Applications/Caffeine.app'
🍺  caffeine was successfully installed!
```
2022-04-09 16:37:23 +01:00
Rylan Polster
dda9f75fca
fetch: only fetch runtime deps with HOMEBREW_INSTALL_FROM_API 2022-04-06 23:36:24 -04:00
Steve Hahn
f5696efc16 set prefer_loading_from_api for fetch 2022-04-05 10:09:52 -07:00
Eric Knibbe
b533b380e5
Merge pull request #13033 from EricFromCanada/cask-search-descriptions
desc, search: also search cask descriptions
2022-03-30 13:48:24 -04:00
Mike McQuaid
61976e0672
caskroom: add, use any_casks_installed?.
Add a new method for the two places we're checking if we have any
casks installed. This is much more performance and user friendly than
attempting to load every cask.

Fixes #13027
2022-03-30 17:25:00 +01:00
EricFromCanada
2fdc70c3bf
desc, search: also search cask descriptions 2022-03-30 11:23:55 -04:00
EricFromCanada
0850fcb24a
list: support long and verbose version listing for casks 2022-03-28 11:06:57 -04:00
hyuraku
0f546b0b3d cmd/deps: repair dot_code 2022-03-19 16:21:01 +09:00
Mike McQuaid
79891a7103
Update uses of Formula.all/Cask::Cask.all
Add some `--all` flags we'll eventually migrate to to ensure that we'll
eventually require their usage to read all formulae. Where we need to
do stuff later, add some comments.
2022-03-08 19:24:56 +00:00
Mike McQuaid
47f8636e7d
update-report: optimise update_report_only_installed code. 2022-02-28 09:58:20 +00:00
Mike McQuaid
d48a9337e4
Revert "update-report: default HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED to on." 2022-02-28 09:54:12 +00:00
Mike McQuaid
dd8a245158
Merge pull request #12910 from Homebrew/update_report_only_installed_default
update-report: default HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED to on.
2022-02-24 08:46:08 +00:00
Mike McQuaid
38e1b3d64b
Deprecations, disables, deletions for 3.4.0 2022-02-22 14:28:32 +00:00
Mike McQuaid
10d5266361
update-report: default HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED to on.
This avoids reading formula files that the user hasn't explicitly
installed which both speeds up `brew update` and improves the security.
2022-02-22 10:01:24 +00:00
Mike McQuaid
04938efc24
Unify GitHub Packages authorization logic in brew.sh. 2022-01-27 15:44:34 +00:00
Thomas Vaillant
ad65d47bee
fix: take $HOMEBREW_DOCKER_REGISTRY_BASIC_AUTH_TOKEN into account when installing portable ruby 2022-01-27 09:37:20 +00:00
Nanda H Krishna
b950ac3f6e
cmd/shellenv.sh: fix typo
Co-authored-by: Greg Myers <myersg86@gmail.com>
2022-01-15 17:27:49 -05:00
Bob Lail
26ea79e1e6 Increase Metrics/BlockLength limit instead of disabling the cop for the block in install_args 2022-01-11 08:34:51 -06:00
Bob Lail
9b678c365b Add flag --overwrite to brew install to govern the keg-linking step
Allows you to avoid the `Keg::ConflictError` recommending that you invoke `brew link --overwrite` in scenarios when you know that that's how you'd proceed anyway.
2022-01-10 14:23:33 -06:00
Rylan Polster
feb93167ad
Rename and fix Formatter:wrap to Formatter.format_help_text 2022-01-08 23:13:08 -05:00
Mike McQuaid
4b3f0719e9
Merge pull request #12678 from hyuraku/repair-cask-formulae-autoremove
repair cask formulae autoremove
2022-01-07 13:09:41 +00:00
hyuraku
1fd4c4d840 rename variables and repair style 2022-01-07 21:05:36 +09:00
hyuraku
37945a407e repair cask formulae autoremove 2022-01-06 22:33:27 +09:00
Mike McQuaid
3a709d36b2
Start process to remove Enumerable from Formula and Cask::Cask.
This is the first step to address
https://github.com/Homebrew/brew/issues/11292.
2022-01-03 14:59:10 +00:00
Mike McQuaid
60afbd761a
Merge pull request #12649 from neutric/update-cmd-cleanup
cmd/cleanup.rb: description style tweak
2021-12-31 13:24:07 +00:00