305 Commits

Author SHA1 Message Date
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Markus Reiter
a24da6b072
Remove FromDefaultNameLoader to avoid warning twice. 2024-03-06 23:14:28 +01:00
Issy Long
f4218a6316
Fix RuboCop Performance/MapCompact offenses
- Rename an iterator variable since it would make the line too long.
2024-02-25 22:59:59 +00:00
Markus Reiter
e0743a1436
Reapply "Refactor Formulary::loader_for."
This reverts commit 24683525cb5abf3cc79a9e0e268fa6efd0af558b.
2024-02-22 18:24:57 +01:00
Markus Reiter
ab27efbd9d
Make Tap::each respect the API. 2024-02-22 17:56:47 +01:00
Mike McQuaid
89fd6964f9
Merge pull request #16715 from reitermarkus/tap-ensure-installed
Clean up `Tap#ensure_installed!` usage.
2024-02-22 08:47:48 +00:00
Markus Reiter
9f5e1f2870
Clean up Tap#ensure_installed! usage. 2024-02-21 03:21:02 +01:00
Markus Reiter
7f5a67917a
Ensure CoreCaskTap is included in diagnostics. 2024-02-20 20:44:02 +01:00
Markus Reiter
4cf0f79368
Support Tap#cask_files when using API. 2024-02-20 20:44:02 +01:00
Mike McQuaid
24683525cb
Revert "Refactor Formulary::loader_for." 2024-02-16 13:41:54 +00:00
Markus Reiter
efa6130a66
Use FromDefaultNameLoader for diagnostics. 2024-02-15 01:37:43 +01:00
Markus Reiter
b717f5d954
Remove unused TapFormulaWithOldnameAmbiguityError. 2024-02-14 22:56:25 +01:00
Markus Reiter
ce60048192
Handle TapFormulaAmbiguityError in diagnostics. 2024-02-14 20:28:08 +01:00
Markus Reiter
0f4d912de5
Remove Formulary::tap_paths again. 2024-02-14 20:28:06 +01:00
Markus Reiter
ecee4aed35
Revert diagnostic change. 2024-02-14 20:28:06 +01:00
Markus Reiter
4641690674
Refactor Formulary::loader_for. 2024-02-14 20:28:06 +01:00
Douglas Eichelberger
eb7c3e52a0 Require SystemInclude only where needed 2024-01-31 11:42:01 -08:00
Issy Long
0e27dc2564
Fix RuboCop Style/ArrayIntersect offenses 2024-01-18 14:11:43 +00:00
Rylan Polster
641a80475e
Update cask logic to handle deprecations and disables 2023-12-16 20:01:47 -05:00
Mike McQuaid
39bbc33a27
Improve use of whoami
If you're e.g. running Homebrew over `sudo`: shelling out to `whoami`
is less effective than just telling people which user you're running
as when we run the check.
2023-09-29 12:32:22 +01:00
Mike McQuaid
37ec0c6d1a
diagnostic: don't complain about missing homebrew/cask.
Unless we're in no API mode: we shouldn't check this.

Fixes #15696
2023-07-18 10:31:51 +01:00
Bo Anderson
ba02c669e1
Introduce CoreCaskTap class 2023-07-13 20:33:26 +01:00
Mike McQuaid
7da934f7e2
Deprecate/disable/delete code.
The next release after this is merged will be 4.1.0.

Co-authored-by: Markus Reiter <me@reitermark.us>
2023-07-06 16:56:20 +01:00
Bo Anderson
94d70b36a4
diagnostic: ignore core tap install status unless no-api is enabled 2023-06-19 04:03:45 +01:00
Issy Long
a1da2bde3d
Appease brew style 2023-04-30 19:09:41 +01:00
Issy Long
e739a5c076
"A few small nits" from code review
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-04-30 19:06:07 +01:00
Issy Long
40f697e96e
diagnostic: Check for unnecessary Core and Cask taps
- If the user doesn't have `HOMEBREW_DEVELOPER` or
  `HOMEBREW_NO_INSTALL_FROM_API` set but does have `homebrew/core` or
  `homebrew/cask` taps installed this can cause problems with installing
  outdated software.
- Hence, warn them in `brew doctor` if they have either of these taps
  installed, with instructions on how to remove them.
2023-04-30 15:25:56 +01:00
Douglas Eichelberger
08af78a2a5 brew style --fix 2023-04-25 09:26:24 -07:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
Douglas Eichelberger
6f813eba13 Fix 'undefined method git_default_origin_branch?' 2023-04-17 06:32:15 -07:00
Douglas Eichelberger
b90897e280 Create git_repo attr 2023-04-15 19:35:13 -07:00
Douglas Eichelberger
8307255ce8 Update call sites 2023-04-15 19:35:13 -07:00
Douglas Eichelberger
429f23dcc6 Create GitRepoPath 2023-04-15 19:35:12 -07:00
Dustin Rodrigues
b776fb32de
change includecount to include_count for readability 2023-03-20 07:23:17 -04:00
Dustin Rodrigues
e5fba88035
use includecount argument in pluralize 2023-03-19 23:35:47 -04:00
Issy Long
8e13a6e1f4
Merge pull request #14944 from issyl0/more-rubocop-naming-method-parameter-name
rubocop: Further trim `Naming/MethodParameterName` allowlist
2023-03-11 22:59:39 +00:00
Issy Long
e9d994622e
rubocop: Drop "f" from Naming/MethodParameterName allowlist
- This either stands for "file" but more often than not "formula".
2023-03-11 00:17:27 +00:00
Douglas Eichelberger
02fd0422aa Enable typing in a few more files 2023-03-09 13:42:06 -08:00
Issy Long
f52fbaf917
rubocop: Drop "ff" from Naming/MethodParameterName allowlist
- It seems that "ff" was short for plural formula, so formulae.
2023-03-08 14:42:58 +00: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
37015b6b08 Change to pluralize, 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
da6d355c52
Merge pull request #14743 from reitermarkus/official-cask-taps
Use `OFFICIAL_CASK_TAPS` constant.
2023-02-21 23:05:32 +00:00
Markus Reiter
8a81473179
Use OFFICIAL_CASK_TAPS constant. 2023-02-21 12:39:07 +01: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
Mike McQuaid
1b75348ed4
Revert "show/check Homebrew branch" 2023-01-18 13:59:58 +00:00
Adrian Ho
c0331c9142 show/check Homebrew branch
Because anyone can forget they're on a different branch, and wonder
why `brew update` isn't pulling in the latest changes (https://github.com/orgs/Homebrew/discussions/4105#discussioncomment-4658869).
2023-01-12 18:20:47 +08:00
Mike McQuaid
77c0d38c35
brew style --fix 2022-12-13 11:37:06 +00:00
Krasimir Nedelchev
92c7ede025 doctor: add -u flag to suggested git stash command 2022-12-04 11:59:15 +02:00
Mike McQuaid
49bacd681e
diagnostic: remove some checks.
- Some of these are currently failing globally on GitHub Actions.
- Some(/all?) of these predate our use of the macOS sandbox,
  environment filtering, PATH filtering and pushing users much harder to
  use bottles instead of building from source
- I haven't seen a case for a long time where any of these actually
  debugged a user issue. If/when this happens: we can add a given check
  back.
- This should allow us to dramatically reduce the amount of cleanup
  that `brew test-bot` needs to do on GitHub Actions.
2022-11-29 09:21:34 +00:00