This was slowing down every instantiation of brew significantly.
Hopefully doesn't break anything that had become accustomed to not having to require 'formula' or 'keg'.
/cc @mikemcquaid
As options are stored in an object owned by the eigenclass of a formula,
options defined in the Formula#options method can be added multiple
times if the formula is instantiated multiple times.
Store them in a set to prevent duplicates.
FixesHomebrew/homebrew#14133.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
When combining the set of old-style and new-style options, make sure
that the leading "--" is stripped.
Fixes displaying options in `brew options`, and the exotic case of
declaring options using the old syntax and then checking them with
`build.include?`
If you google for "Cowardly refusing to sudo brew" you get a lot of confused users who didn't read any of the Homebrew documentation and then had a hissy-fit.
A user on IRC was getting strange results from MacOS.dev_tools_path.
It turns out that xcrun's exit status is not always reliable - if
xcrun is a shim and not able to locate the real xcrun, it will exit
0 despite not actually doing what it was asked. Instead check to see
if the stout is empty.
I managed to remove a return while fixing this yesterday. The whitespace changes made the diff unreadable so I missed this regression.
Why does this sort of thing still happen?
This stuff sucks. I'd like to just replace the dash with a directory division or tilde character. But this makes the code even more complicated, unless we can figure out how to migrate the taps.
ClosesHomebrew/homebrew#13689.
Signed-off-by: Max Howell <mxcl@me.com>
There are subtle distinctions between writable? and writable_real? we don't
understand precisely why we need this, but it fixes the bugs :/
Currently, if brew doctor detects untracked changes in the local repo,
it suggests doing 'git reset --hard', but that doesn't remove untracked
files. This change adds an additional suggestion to run 'git clean -f'
to remove them.
ClosesHomebrew/homebrew#12814.
Signed-off-by: Max Howell <mxcl@me.com>
Changed the path to Library as we don't want to clean -f all over the whole /usr/local :P
If a formula is in Formula due to tapping or otherwise, don't prohibit installation.
Really we should make the blacklist *really* stuff that should be blacklisted and then if it is available still require a --force. But currently with okay stuff like vim in there, and libxml2 being both blacklisted *and* in mxcl/master, we are screwing ourselves.
TL;DR we should do some work on this component.
FixesHomebrew/homebrew#13234.
The short-circuit returns would cause the caching ||= syntax to be skipped. For me on my CLT-less install, this was noticeably slowing down brew for some operations due to the frequent calls to xcodebuild.
- patch no longer needed
- blacklist.rb: Removed version number because we forget to update it too often.
ClosesHomebrew/homebrew#13997.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
We don't want bug reports about this crap, even though the user REALLY should listen to the warning message. What actually happens is they blame us instead.
This kind of warning in particular:
warning: Insecure world writable dir /usr/local/bin in PATH
Now that X11 components are specified as dependencies, users will be
prompted to install these components when necessary, and this check is
no longer needed.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>