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.
When either being in a non-default prefix or being on an unsupported
macOS version we expect most things to be built from source. In that
environment, do not allow HOMEBREW_INSTALL_FROM_API to be set.
Fixes#14475
- flip the messaging to refer to `HOMEBREW_NO_INSTALL_FROM_API` where relevant
- remove some duplicate checks
- better scope checks to just core tap formulae
The `stackprof` gem wasn't being included
correctly because it was missing the path
directory. This vendored gems path is added
later on in `load_path.rb`.
We export the GEM_PATH and GEM_HOME environment
variables in setup_gem_environment! so we
can use that information if we require the
`rubygems` gem first.
We're still getting a non-trivial number of issues from configurations
we don't support and don't plan to.
Let people know that we know their experience will not be good and what
to expect if they file issues.
Co-authored-by: Eric Knibbe <enk3@outlook.com>
This came up in https://github.com/Homebrew/homebrew-bundle/issues/1108
wherein a user had unwittingly untapped some official taps that get
automatically tapped on first use and couldn't figure out why they
couldn't use the associated command.
There's a few bits of functionality that Homebrew has changed over the
years, makes sense as a sensible default but some people find really
annoying:
- automatically running `brew update`
- automatically running `brew cleanup`
- automatically upgrading outdated dependents
- automatically reinstalling broken dependents
For each of these: let's improve the documentation of the commands
whose behaviour is changed and the environment variables themselves.
- 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
Previously, running e.g. `brew help bundle` when homebrew-bundle was not
tapped would tap homebrew-bundle and then run `brew bundle` showing
`Error: No Brewfile found` instead of the expected help text.
Align the logic in `cleanup_portable_ruby` with that in `ruby.sh`.
Co-authored-by: Maxim Belkin <maxim.belkin@gmail.com>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>