In fixing this I also made it so that ARGV.kegs will return the LinkedKeg if the symlink is set. Which is almost always is. This neatly avoids most multiple-kegs issues.
FixesHomebrew/homebrew#10685.
If a user has set core.autocrlf = true (which shouldn't ever be used on
OS X, but alas...), a subsequent `brew update` will check out files with
CRLF line endings. Setting core.autocrlf = false in Homebrew's repo
config will override this global setting, and let us check out files
with their in-repository line endings.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
The order of things made the check for git in the path pointless (and
was my fault); this is a better way to do it.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
`brew install > file` should not give "export CC=/foo" output on Build Failures.
Also moved the "Using clang" output to brew when BuildError is thrown as that is where it is interesting, and not if you just do `brew --env`.
This reverts commit 21acfc1c7e66babf112196812fdfcf442edf3a97.
This was reverted because we tried to leave /usr/local with root permissions, but
this caused problems for us. Sorry Rogue Amoeba. I'd suggest not installing your
App's tools into /usr/local. It's outside your App's domain, so you can't be sure
what will happen there.
There are still methods and variables with the word "folder" in the
name, but at least user-facing messages and warnings should use the
correct terminology.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Calling Keg#unlink on "#{f.rack}/#{f.version}" will perform the unlink
relative to the _new_ keg, rather than the keg we are upgrading from.
Fix this by resolving the linked_keg entry and unlinking relative to it.
FixesHomebrew/homebrew#10296.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Using xcrun as a proxy to execute the compiler tools is per its design. This means you can't treat ENV['CC'] as a path anymore, but I think I found the cases this was being expected and corrected them. It was not proper anyway to assume the variable was a path, it can be anything. Like a proxy. Like xcrun.
Also more thoroughly clear ENV.
If we're going to unset GREP_OPTIONS we may as well unset this one too,
as it causes similar issues. Recent autoconf unset both of these.
FixesHomebrew/homebrew#8165.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>