5321 Commits

Author SHA1 Message Date
Issy Long
0cd616bc66
rubocop: Drop "r" from Naming/MethodParameterName allowlist
- This stands for "resource" in our case, so use the long name.
2023-03-08 14:42:55 +00:00
Douglas Eichelberger
54fad14ff3 Fix module_function errors 2023-03-06 15:11:10 -08:00
Douglas Eichelberger
1c44a8861d Fix type errors 2023-03-06 15:03:19 -08:00
Douglas Eichelberger
d56e2884aa Enable typing in cmd/ 2023-03-06 15:01:08 -08:00
Douglas Eichelberger
396954c3a8 Initialize lvars as empty arrays 2023-03-06 13:40:04 -08:00
Douglas Eichelberger
e57e50f228 Fix undefined error in update-report 2023-03-06 13:40:04 -08:00
hyuraku
ed2c1d3716 repair cmd/uninstall with zap option 2023-03-06 22:27:53 +09:00
Mike McQuaid
5689065c9e
Merge pull request #14880 from dduugg/fix--env
Fix type error in brew --env
2023-03-06 12:33:11 +00:00
Issy Long
6a704f2f40
sorbet: Bump more files to typed: true
- This was done through the `brew typecheck --suggest-typed --update`
  command.
2023-03-05 18:18:59 +00:00
Mike McQuaid
8051e8818a
Merge pull request #14866 from MikeMcQuaid/update-report-all-formulae-api 2023-03-05 08:10:57 +00:00
Douglas Eichelberger
b7d2953412 enable typing in --env 2023-03-03 19:12:33 -08:00
Douglas Eichelberger
e63111a7b5 resolve type error in --env 2023-03-03 18:41:19 -08:00
Mike McQuaid
8c333f4ec6
Merge pull request #14851 from hyuraku/move-cask/cmd/list-to-cask/list
Move `cask/cmd/list` to `cask/list`
2023-03-03 09:26:01 +00:00
Mike McQuaid
c2cf0e6f65
Merge pull request #14862 from carlocab/fsmonitor
cmd/update.sh: limit setting `core.fsmonitor` to `false`
2023-03-03 09:11:51 +00:00
Mike McQuaid
26182fd67a
Note that brew update will only report all without API.
It's not worth supporting this option any longer given the API
constraints.
2023-03-03 08:51:58 +00:00
Douglas Eichelberger
0384b82adc
Merge pull request #14826 from dduugg/no-open-struct
Enable Style/OpenStructUse cop
2023-03-02 12:30:28 -08:00
Mike McQuaid
62ee6faa58
Merge pull request #14802 from MikeMcQuaid/update_report_handle_formula_names
Show New/Deleted Formulae/Casks from `brew update`
2023-03-02 14:16:13 +00:00
hyuraku
e39232313f move cask/cmd/list to cask/list 2023-03-02 21:53:15 +09:00
Carlo Cabrera
a29939e8ed
cmd/update.sh: limit setting core.fsmonitor to false
We set `core.fsmonitor` to `false` in #13586 because Git's fsmonitor
daemon prevented the release of our locks, resulting in errors for some
users reported in #13521.

However, the fix from #13586 set `core.fsmonitor` to `false` too often.
This is not needed for taps, or when `HOMEBREW_REPOSITORY` is different
from `HOMEBREW_PREFIX`. The issue in #13521 stems from the fsmonitor
daemon preventing the release of our locks, so there is no need to
prevent the daemon from monitoring repositories that don't contain our
lock files.
2023-03-02 14:04:31 +08:00
Mike McQuaid
9296db0c41
Merge pull request #14839 from hyuraku/move-cask/cmd/info-to-cask/info
Move `cask/cmd/info` to `cask/info`
2023-03-01 12:25:26 +00:00
Douglas Eichelberger
719f1d6c6e Refactor some use of OpenStruct 2023-02-28 13:05:43 -08:00
Mike McQuaid
2451d017f9
update-report: allow additions/deletions from the API.
If we're installing from the API: we cannot use Git to check for differences in
packages so instead use `{formula,cask}_names.txt` to do so.

The first time this runs: we won't yet have a base state
(`{formula,cask}_names.before.txt`) to compare against so we don't output
anything and just copy the files for next time.
2023-02-28 16:46:44 +00:00
hyuraku
efdef5f26c move cask/cmd/info to cask/info 2023-03-01 00:00:54 +09:00
Carlo Cabrera
1201f18db0
Merge pull request #14667 from carlocab/update-reset-tap-names
cmd/update-reset: improve arg parsing
2023-02-28 22:05:10 +08:00
Carlo Cabrera
53053e0625
cmd/update-reset: improve arg validation
This is based on feedback from #14667.
2023-02-28 20:38:00 +08:00
Carlo Cabrera
12364d70d2
Revert "cmd/update-reset: accept tap names as arguments"
This reverts commit ac7dbc008284e1a85353548eb8e15c008be902ec.
2023-02-28 20:30:40 +08:00
Douglas Eichelberger
2073e70696 brew style --fix 2023-02-27 21:43:10 -08:00
Douglas Eichelberger
f9f73f3ef6 Tidy up 2023-02-27 21:42:47 -08:00
Douglas Eichelberger
1ab278f74c Fix style/type violations 2023-02-27 20:34:07 -08:00
Douglas Eichelberger
0eccc0e987 git grep -l Utils::Inflection | xargs gsed -i 's|Utils::Inflection|Utils|g' 2023-02-27 20:18:27 -08:00
Douglas Eichelberger
3da68651e5 Port more call sites 2023-02-27 20:18:08 -08:00
Douglas Eichelberger
eb2b990575 Port more call sites 2023-02-27 20:17:33 -08:00
Bo Anderson
e86a8c2477
Move HOMEBREW_NO_INSTALL_FROM_API defaults to shell 2023-02-24 21:53:08 +00:00
Mike McQuaid
f284c662de
Merge pull request #14800 from MikeMcQuaid/cleanup_formula_cask_json
Fix references to `formula.json` and `cask.json`
2023-02-24 17:00:37 +00:00
Mike McQuaid
c209c0403d
Fix references to formula.json and cask.json
These would be stranded after `formula.jws.json`.
2023-02-24 16:46:15 +00:00
Mike McQuaid
4ef8632687
cmd/info: handle casks with API.
Fall back to default location.
2023-02-24 15:44:53 +00:00
Mike McQuaid
f280ce069b
Support loading formulae/casks from subdirectories
Previously, we required all formulae and casks to be in a specific
formula or cask directory but did not check any subdirectories.

This commit allows using subdirectories for official taps, the only
ones likely to be big enough to warrant sharding in this way and to
avoid potentially breaking backwards compatibility for existing taps.

This was inspired by the most recent issues with homebrew-cask.
2023-02-24 10:57:41 +00:00
Mike McQuaid
236208ff79
Merge pull request #14756 from apainintheneck/clean-up-extend-os-requires
extend/os: clean up requires
2023-02-23 09:07:59 +00:00
apainintheneck
8de625e0e2 extend/os: clean up requires
These need to be after the original module/class definitions
for the monkey-patching to work correctly.
2023-02-22 21:21:24 -08:00
Bo Anderson
b7d6d00c34
api: use signed endpoint 2023-02-22 21:53:32 +00:00
Issy Long
298bb65dfb
rubocop: Entirely disable Metrics cops
- These are arbitrary length limits that had a load of disables in code.
- The limits were only increasing over time rather than decreasing.
- Fixing the problematic code to be shorter would take a long time for
  questionable gain since the problem has been around so long.
2023-02-21 00:34:17 +00:00
Mike McQuaid
7f1a0936e5
Merge pull request #14702 from issyl0/greedy-short-g
cmd/(outdated,upgrade): Document `-g` as a shorter `--greedy` for Casks
2023-02-20 09:54:18 +00:00
Mike McQuaid
aaec4014fd
Merge pull request #14710 from issyl0/rubocop-excludes
rubocop: Clean up some `Exclude`s
2023-02-20 09:51:11 +00:00
Mike McQuaid
3d3b20b6d6
Merge pull request #14675 from Bo98/api-bash
Further improvements to API handling in shell
2023-02-20 09:45:56 +00:00
Mike McQuaid
ae9763d9ce
Merge pull request #14684 from MikeMcQuaid/no_analytics_uuid
analytics: remove UUID.
2023-02-20 09:18:47 +00:00
Mike McQuaid
57844530a9
analytics: remove UUID.
We don't use this at all with InfluxDB and don't need it any more for GA
so let's just remove it.
2023-02-20 09:05:15 +00:00
Issy Long
f8654bd363
rubocop: In-line disables of Metrics/{Module,Block,Class}Length
- We're not going to make the really long things be any shorter any time soon.
- The instructions in issue 14685 say, pragmatically, "disable all the rubocop
  rules we're never going to realistically fix e.g. Metrics/ClassLength". But
  that felt like a slippery slope to more _really_ long modules/classes/blocks,
  and the limits are here for a reason.
2023-02-19 16:33:23 +00:00
Bo Anderson
c2342eca91
Further improvements to API handling in shell 2023-02-19 05:38:13 +00:00
Issy Long
44b0050b94
cmd/(outdated,upgrade): Document -g as a shorter --greedy for Casks
- Fixes https://github.com/Homebrew/brew/issues/ 14682.
2023-02-18 18:47:49 +00:00
Mike McQuaid
fbdec8738d
Warn more when building from source
We warn sometimes when we tell people to build from source and it's
not supported but we don't actually warn non-developers when invoking
the various install commands so: let's start doing so.

While we're here, also update the existing messaging to reflect the fact
we're on Mastodon now too and we don't want maintainers being
individually bothered about errors either.

I've tried to balance having messages here vs. having them be so long
at the beginning of installation that they will be missed or be overly
obnoxious.
2023-02-17 16:10:38 +00:00