It is a no-op under Ruby 1.8 but Pathname#find raises ENOENT if the
directory doesn't exist under 1.9. But we really shouldn't try to clean
a non-existent keg anyway, and FormulaInstaller will have bailed out
long before the clean step if the keg doesn't exist, so lets just not
even test this condition; the cleaner has its own tests anyway.
Alternatively we can adjust the cleaner to handle this case, but I don't
see much value in that.
n.b. with this, the tests now pass under 1.9.3 (for me), which is nice
because I often run them on that version inadvertently.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Previously we detected this by reading the first line of the file.
However, "first line" is meaningless when dealing with binary files, but
IO#readline will happily keep reading until it finds a newline
character, which can result in some unnecessarily large buffers.
Aside from the performance issue, this causes an additional problem
under Ruby 1.9: trying to match the binary string against a pattern will
raise ArgumentError (unless the binary string just happens to also be
valid UTF-8, heh).
Fix both issues: only read the first 1024 bytes, as no sane shebang will
ever be that long, and use a plain read(), which returns an ASCII
encoded string even on 1.9.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Setting $VERBOSE in the environment makes the haskell-platform build
fall down, which is surely one of the odder bugs I've run into.
See Homebrew/homebrew#15164.
Entry_#copy_metadata has a nasty bug that makes copying symlinks
across filesystems fail. This lasted all the way through 1.9.3p194
before *finally* being fixed. This backports the official fix.
FixesHomebrew/homebrew#14710.
All logs are now stored from each command executed in Formula.install.
Error output is truncated to five lines in an attempt to not overwhelm the user and to encourage users to read the error output and report the bug properly. Maybe we can get that figure up from 70% to 90%.
The Keg constructor was throwing because we were returning a relative path, and the error-handler was just returning a string rather than raising a string.
Worrying because a lot of opts have not been fixed and I thought this was essential for depending on keg-only formula nowadays.
Refs Homebrew/homebrew#15077.
Apparently setting RUBYLIB to '-' causes the library path to be unset. So we need to set our own library path in our scripts.
Fixes Homebrew/homebrew-versions/#47.
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.
In cases where the xcode-select -print-path is '/' xcrun still hangs indefinitely, setting DEVELOPER_DIR to something (preferably the Xcode path) fixes that. So let's.
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.
`brew linkapps` was creating `MacVim` on the first run, then
`MacVim alias` on the second run.
ClosesHomebrew/homebrew#14955.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
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.