253 Commits

Author SHA1 Message Date
Mike McQuaid
631db5502d
diagnostic: automatically tap homebrew/core.
Otherwise, this just dies with `Error: No available tap homebrew/core.`.
2022-08-26 12:38:03 +00:00
Bo Anderson
e78665f4f7
Replace ENV["HOME"] with Dir.home 2022-06-17 19:47:57 +01:00
Bo Anderson
40bbdc659e
Fix some Style/FetchEnvVar offences 2022-06-17 19:47:57 +01:00
Rylan Polster
89483abda9
Remove Bottle API 2022-06-14 16:06:05 -04:00
Mike McQuaid
1bb44979ee
Disable and delete code for 3.5.0
The next planned release will be 3.5.0 so let's fix things up for there.
2022-05-30 14:59:14 +01: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
Rylan Polster
6bd507d472
Cleanup conditional
Co-authored-by: Bo Anderson <mail@boanderson.me>
2021-10-31 15:43:13 -04:00
Rylan Polster
83073c3ee6
Fix brew doctor with HOMEBREW_INSTALL_FROM_API 2021-10-31 04:11:02 -04:00
Rylan Polster
dd1a36052c
Fix brew doctor 2021-10-27 01:41:57 -04:00
ylht
75a38b7187 refactor the format 2021-07-19 10:02:19 +08:00
ylht
e5986dba6c cmd/doctor: repair xattr not find 2021-07-19 09:55:30 +08:00
hyuraku
d177d8a159 make all keg names uniq 2021-07-01 09:20:58 +09:00
hyuraku
af68ceff88 repair Diagnostic::Checks#all 2021-06-22 20:57:09 +09:00
Mike McQuaid
2395113154
diagnostic: hide some warnings on Apple Silicon.
We don't want to complain about either Intel or ARM installations of
Homebrew in `brew doctor` so check for/allow both.
2021-06-15 11:51:29 +01:00
Bo Anderson
a06d136d2c
Move Sorbet gems into an optional group 2021-06-11 08:10:30 +01:00
Adrian Ho
1cf8b43966 Unrefactor broken tap
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-06-02 00:11:18 +08:00
Adrian Ho
c7bbb904e8 diagnostic: add check for broken taps
Detect half-baked core taps that show up on a fairly regular basis (e.g. #11465).

The logic is simple enough: Since an improper tap wouldn't have a complete Git config, and is always somewhere below `HOMEBREW_REPOSITORY`, any Git operation would look at the Brew repo instead. We simply need to test for any of:

1. Empty tap origin
2. Empty tap HEAD
3. Tap HEAD == Brew HEAD
2021-06-01 23:16:45 +08:00
hyuraku
40b39151f9 rename the variable 2021-05-30 16:26:58 +09:00
hyuraku
bfa9938e3f repair and add cask taps 2021-05-27 21:43:08 +09:00
hyuraku
a0799bfbf9 add cask tap to Diagnostic::Checks#check_git_status 2021-05-24 23:30:46 +09:00
Bo Anderson
8ff7b58cba system_config: remove describe_java 2021-02-09 20:58:30 +00:00
EricFromCanada
6fc116318e fixes for grammar and wording 2021-01-26 16:19:47 -05:00
EricFromCanada
2ed324ebc0 use backticks around suggested input, flags, and binaries 2021-01-26 16:19:47 -05:00
EricFromCanada
cd3cb6928b indent suggested commands on subsequent line
and combine sequential puts calls
2021-01-26 15:36:44 -05:00
EricFromCanada
a427de5bee capitalization fixes
"curl" is the binary, while "cURL" is the umbrella project.
2021-01-26 15:36:44 -05:00
Seeker
b9854bd4cf rubocops: add unless_multiple_conditions 2021-01-08 10:33:54 -08:00
Rylan Polster
e04f450684 doctor: disable python symlink message 2020-12-31 10:41:38 -05:00
Mike McQuaid
b751742dfc
diagnostic: don't complain about creatable directories that don't exist.
If you can write to `HOMEBREW_PREFIX` (which isn't the case for
`/usr/local` on newer macOSs) then don't complain about these
directories not existing.
2020-12-07 14:32:56 +00:00
Jonathan Chang
92d3eda914 git_extensions: move origin_branch from utils/git 2020-12-06 14:33:23 +11:00
Markus Reiter
9649ef975c Only install default cask tap automatically on macOS. 2020-12-05 03:39:01 +01:00
Jonathan Chang
5309470f28 diagnostic: check all tap branches, not just core 2020-11-27 16:21:45 +11:00
Dustin Rodrigues
1c925d52fe docs - remove Discourse from communication methods 2020-11-15 13:20:03 -05:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Mike McQuaid
5afff3f3aa
Handle macOS Homebrew on ARM
- Output `brew doctor` and `brew install` messages noting this configuration is (currently) unsupported and encourage use of Rosetta instead
- Output Rosetta 2 usage in `brew config` on ARM (whether in Rosetta 2 or not)
- Check the architecture of (newly installed) dependencies and ensure they are using the correct architecture.
- Don't allow installing macOS Intel Homebrew in macOS ARM Homebrew default prefix (and vice versa
- Actually write out the architecture of dependencies to the tab rather than generating and throwing them away
- Set and document the expected default prefix for macOS Intel Homebrew, macOS ARM Homebrew (`/opt/homebrew`) and Homebrew on Linux

While we're here:
- Don't say Big Sur is a prerelease version but still make it clear we
  don't support it (yet).
- Don't reference non-existent IRC channel
2020-11-12 17:06:47 +00:00
Jonathan Chang
ab7b757400 rubocop: fix Style/NegatedIfElseCondition 2020-11-10 23:28:31 +11:00
EricFromCanada
dddfbf80fc apidoc: add/update yard tags 2020-11-06 00:16:35 -05:00
Mike McQuaid
7e2b228460
diagnostic: improve deleted message.
Raised in #9036.
2020-11-04 10:20:14 +00:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Jonathan Chang
08059680f0 diagnostic: fix xattr check
Python emits the version on either stderr or stdout based on major
version, so just to be safe let's use popen_read and combine the
output streams.
2020-09-21 01:15:31 +10:00
Mike McQuaid
3923d331de
Fix brew style 2020-09-15 13:39:06 +01:00
Mike McQuaid
f161e56ce0 ENV: check SDK exists when setting up.
Reuse code from `brew doctor` that checks and produces a fatal error
and from `install.rb` that runs it.

Closes #8646
2020-09-11 12:05:22 +01:00
Mike McQuaid
8b97c27c21 brew style manual fixes 2020-09-01 14:26:45 +01:00
Markus Reiter
e024b12d47 Remove os/linux/diagnostic. 2020-08-24 00:22:17 +02:00
Markus Reiter
3118fedab9 Refactor and document Git. 2020-08-23 06:40:07 +02:00
Mike McQuaid
3a91c37e66
Fix RuboCop checks. 2020-08-19 17:12:32 +01:00
Markus Reiter
d50dc2e1bb Refactor and document Homebrew::Diagnostic. 2020-08-14 18:46:43 +02:00
rmnull
043719383b
remove code using patchelf, remove HOMEBREW_PATCHELF_RB var 2020-08-08 06:48:31 +05:30
Mike McQuaid
a1dc809f5b
bin/brew: don't filter GitHub Actions variables. 2020-08-07 10:19:00 +01:00
Mike McQuaid
e4eff8ebb6
Merge pull request #7974 from MLH-Fellowship/integrate-doctor
doctor: Run cask doctor checks in brew doctor
2020-07-22 13:27:53 +01:00
William Ma
f4bc2db736 doctor: Disable cask staging path check when running CI, fix style 2020-07-20 08:31:26 -04:00