This code makes assumptions about the existence of prefix which are
valid in the context of the installer, but not necessarily in the
context of `brew info`, thus `brew info` on an outdated formula errors
out.
This reverts commit e5b53dd64b769b67805d1054d906f7083939d905.
We support three configurations: Xcode-only, CLT-only, and Xcode with
CLT. Our configuration output should correctly reflect this.
While MacOS::Xcode.version has to continue to return a guess if Xcode is
not installed in order to maintain backwards compatibility, this is an
implementation detail that we don't need to expose to the user. And it
makes `brew --config` output confusing.
So let's only print the "Xcode" line when an actual Xcode installation
is present. This makes it easy to quickly figure out which of the three
possible configurations the user is running.
Addresses Homebrew/homebrew#14941, more or less.
* Use version compare to only remove kegs with lower version than the
current one, not higher version which might be from someone's
branch.
* Do the same for cache cleanup.
- Be conservative so that if a name detected from cache file is not
the same as its formula then don't clean it.
ClosesHomebrew/homebrew#15914.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Enumerable#one? is not available under Ruby 1.8.6. Further, we really
want #any? here, as setting both HOME and CURL_HOME can trigger a false
negative.
FixesHomebrew/homebrew#15883.
Added doctor check for .curlrc rather than silently ignoring it (#13836).
ClosesHomebrew/homebrew#15419.
Signed-off-by: Max Howell <mxcl@me.com>
Removed test in doctor where it actually curl'd a file. It's enough to warn if the curlrc exists. I understand people want to remove the warnings, but the point in the doctor is to help diagnose and not to be some ramification of your UNIX system.
* Renames --force to --overwrite, freeing up brew ln --force for Homebrew/homebrew#13349
* Changes --dry-run to preview linking by default, rather than
overwriting. An overwrite dry-run can be simulated via both
--dry-run --overwrite
* Adds some basic Keg tests
We add the bins from all deps instead. Rationale: formula find and use eg. GNU-coreutils versions of things and then break. Only allow formula to use tools that they depend on and expect.
I want to go further and only add include paths etc. for dependencies, I have done some work on this, but I fear it may be impossible. If an include path is eg. /usr/local/lib/foo/include, is it possible to know if this path is bad? Not always AFAICT.
Output JSON with the --json=v1 option. Output is in an array, and
supports one or more formulae (or all, with the --all option).
Why 'v1'? The format is unstable, presumably we'll deprecate it
someday. It should be solid by Homebrew 1.0.
ClosesHomebrew/homebrew#13299.
It looks like there can be harmless stuff leftover in
/Developer/Library, even after Xcode uninstalls older versions. The
existence of the uninstall-developer-folder script should be a better
indicator.
FixesHomebrew/homebrew#14970.
Rescuing false on the StandardCompilers map meant that the doctor
check assumed that the compilers were incorrect, not merely
unknown.
Instead, skip the check and return nil for unknown Xcode; nil
should be interpreted as "dunno", instead of "true" or "false",
and the doctor check no longer prints on nil.
/Developer/Library shouldn't exist if all the remnants of old
Xcode versions have been uninstalled, and tends to cause problems if
it's kept alongside modern Xcode.
"uninstall-developer-folder" should only remove /Developer/Library.
Rationale: everyone thinks it points to the currently installed prefix, not the prefix of the formula that is newest and maybe not installed.
The previous behavior was unintentional and evidence proves it is not intuitive either.
I anticipate no regressions. And hope I am right!