- Move HOMEBREW_TAP_DIRECTORY to startup/config.rb because this file
holds more of the directory constants
- Rename `Commands.cmd_directories` to `Commands.tap_cmd_directories`
to better express that the commands come from taps
This file has the directory constants while the other one has regexes.
Just better organization.
We were selectively requiring the tap.rb file in a few places for
performance reasons. The main method we were referencing was the
`Tap.cmd_directories` method which uses `Pathname` and the `TAP_DIRECTORY`
constant internally. `Tap.cmd_directories` is mostly used in the `Commands`
module and that is loaded very early on in the program so it made sense
to move that command to that module. To facilitate that I moved the
`TAP_DIRECTORY` constant to the top-level and renamed it to
`HOMEBREW_TAP_DIRECTORY`. It now lies in the tap_constants.rb file.
A nice bonus of this refactor is that it speeds up loading external
commands since the tap.rb file is no longer required by default in
those cases.
- 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.
- 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.
- fix `check_for_config_scripts` test, no idea why this wasn't working
- don't autoretry tests if `focus` or `byebug` are enabled
- add a ARM64 Ventura bottle symlink
- This also required auto-fixes for Layout/EmptyLinesAroundBlockBody and
Layout/InconsistentIndentation once the auto-fixer had got rid of the
"redundant begin"s.
Set the environment variable USER=root which is required by
brew tests --only=utils/user
Fix these tests:
rspec ./test/diagnostic_checks_spec.rb:26 # Homebrew::Diagnostic::Checks #check_access_directories
rspec ./test/pathname_spec.rb:120 # Pathname#ensure_writable makes a file writable and restores permissions
rspec ./test/utils/user_spec.rb:22 # User#gui? when the current user is in a console session gui? should equal true
rspec ./test/utils/user_spec.rb:6 # User should eq nil