Make sure to call `brew tests` only once with `--coverage` to avoid
expensive multiple runs and to prevent later runs from overwriting
previously sent results to Coveralls. (The previous setup overwrote the
results from a regular run with results from the `--generic` run.)
The `--no-compat` variant without any other options specified seemed to
be the most appropriate for a coverage report.
Closes#546.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
SimpleCov 0.12.0 brings some moderate speed improvements and soon (sadly
not yet) can be switched back to a stable release. Update to matching
Coveralls release, fortunately with fewer dependencies than before.
Make `Library/Homebrew` the new root now that *all* implementation files
are in this directory. Update filters/groups accordingly.
Note that paths in filters/groups are not anchored at the root and are
always matched against the full path. Our rules are effectively anchored
because they always include the `/Homebrew/` path component.
Provides feature parity between the block and non-block forms of
inreplace by creating a four-argument version of the non-block form,
where the fourth argument is an optional Boolean value, defaulting to
true, which specifies whether a failed inreplace should cause an
InreplaceError error to be raised. The fourth argument is passed along
to StringInreplaceExtension#gsub!, which already supports an optional
audit_result argument.
This resolves the Catch-22 that single replacements aren't permissible
in the block form (in that they now cause `brew audit` to complain), but
the audit_result argument is not available in the non-block form.
Closes#552.
Signed-off-by: ilovezfs <ilovezfs@icloud.com>
Since we are loading options as Formula#build from tab, we will have to explicitly read
options from ARGV as well.
Fixes#3066.
Closes#537.
Signed-off-by: Xu Cheng <xucheng@me.com>
On systems prior to 10.9, formulae that use CVS as a download source
check whether the installed Xcode already provides CVS to avoid adding
a dependency on the `cvs` formula. Unfortunately, if no Xcode is
installed the check fails with
undefined method `<' for nil:NilClass
causing the formula to become unloadable. This in turn causes some taps
to be untappable since #396 added the `readall` check on `tap`.
Closes#508.
This prevents a link conflict during `brew upgrade` causing opt link
stuck to old version. At this point, users will have to run `brew switch`
to fix it.
Closes#533.
Signed-off-by: Xu Cheng <xucheng@me.com>
Switch to HOMEBREW_LIBRARY since HOMEBREW_LIBRARY_PATH already includes
"/Homebrew" and HOMEBREW_LIBRARY is less confusing.
Closes#530.
Signed-off-by: ilovezfs <ilovezfs@icloud.com>
Substitue each Version.new and HeadVersion.new with Version.create
to unify Version and HeadVersion instantiation among core code.
Note that this does not relate to Mac::OS::Version class.
Move some stuff formerly in `Library/ENV` around:
- Move `Library/ENV/$XCODE_VERSION` to `Library/Homebrew/env/super` as they are
all superenv wrappers and all symlinks to the same version. We never needed
the "separate shims for separate versions" functionality and it just adds
confusion.
- Move `Library/ENV/pkgconfig` to `Library/Homebrew/env/pkgconfig` to get more
things under `Library/Homebrew`
- Move `Library/ENV/scm` to `Library/scm` as these wrappers are not actually
used by or related to superenv (or stdenv) in any way.
Users may have ~/.curlrc file to include options like proxies.
However, since we overwrite HOME environment variable during the build
and test, curl won't be able to find it.
This commit solves this issue by using CURL_HOME environment variable,
which will be pointed to the original HOME path.
From `curl(1)`:
> 1) curl tries to find the "home dir": It first checks for the
CURL_HOME and then the HOME environment variables. Failing that,
it uses getpwuid() on Unix-like systems (which returns the home
dir given the current user in your system). On Windows, it then
checks for the APPDATA variable, or as a last resort the '%USER-
PROFILE%\Application Data'.