Ensure that a non-zero exit code is set both for missing random dylibs
and random missing dependencies.
Additionally, while we are here, drastically trim down the public
interface for this class to the bare minimum and allow getting the
output from `display_test_output` as a variable.
Fixes issue mentioned by @ilovezfs in:
https://github.com/Homebrew/brew/pull/3940#issuecomment-383794520
The `cask` attribute doesn't make as much sense on Linux but can be
ignored there. The advantage of this change is that (like #4086) it
allows figuring out the relevant cask for a formulae requirement on a
Linux machine.
On some systems identified as Linux, zip and bzip2 might
not be available. Therefore, on such platforms we add them
unconditionally as dependencies when required. On Mac, these
dependencies are always satisfied.
Remove more Requirement logic to enable future removal of default
formula logic. Also, output deprecations, convert symbol requirement
usage to deps and simplify the compatibility code for the direct
Requirement usage.
These are ones that were either already deprecated due to audit rules
or are just a simple `which` with a `default_formula` so should just
be a dependency.
CMake tries to use Xcode if MACOSX_DEPLOYMENT_TARGET is set but that can
lead to build failures when SDKROOT isn't set. The CMake behavior at
minimum manifests as -isysroot spontaneously being set to the Xcode SDK,
which brew sometimes can't successfully fully unwind with its ENV hacks.
- atomic_write: close file before renaming to prevent error:
'Device or resource busy'
- ensure_writable: preserve executable bit
- new elf? and dynamic? methods
This enhances the Java requirement to support prompting the user
to install the correct legacy Java version via Cask for formulae
that don't yet work with the latest version of Java. Previously,
even if the formula had a strict requirement that a specific,
older version of Java be used, the messaging would tell the user to
`brew cask install java` (i.e. to install the latest version of Java),
which wouldn't actually satisfy the requirement.