Multi-JSON is a library that provides encode/decode support for casting Ruby
objects to JSON strings and back again. This version of the library has been
tested against ruby versions 1.8.6 and later.
Having a JSON encoder/decoder in the toolbox helps now that the GitHub API only
returns results in JSON format.
`ARVG` is now filtered before the formula installer forks a new process. This
allows a chance to do things like strip out `--HEAD` flags for formulae that
weren't explicitly passed as arguments but came in as dependencies.
FixesHomebrew/homebrew#7724.
It is often useful to be reminded that you are, in fact, in the middle
of a debug or interactive install. We provided this reminder in the form
of HOMEBREW_DEBUG_INSTALL, but we can make this even easier for the end
user to consume by exposing it in the form of a shell function.
When HOMEBREW_DEBUG_INSTALL is set, the __brew_ps1() function returns
the string "(formula_name|DEBUG)" by default (much like the __git_ps1()
output when performing some long-running operation, e.g.
"(branch|REBASE-i)". The formatting around "formula_name|DEBUG" can be
customized by passing a format string to the function.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This would silently fail if HOMEBREW_REPOSITORY != HOMEBREW_PREFIX,
which is obviously a valid Homebrew setup.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
A terminal width of 262 or greater can trigger a buffer overflow in
curl's progress bar code, resulting in a segfault and aborted downloads.
Warn about this.
cf Homebrew/homebrew#8521.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Sometimes you want to know what `brew cleanup` will do before it
actually removes anything. Introduce a '-n' option (chosen to match
other UNIX tools) to do this.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
There was an UnsafeSubversionDownloadStrategy in a single formula
before, but a) it broke against later changes to
SubversionDownloadStrategy, and b) wasn't available to other formula.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This will actually throw some possibly unwanted warnings, e.g. whining
about using mirrors.kernel.org for Debian software; we might only want
that warning for the default URL.
Perhaps mirrors deserve their own audit_formula_mirrors, but rather than
duplicate code, let's just check them against the standard criteria for
now.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
brew-unpack was failing for formulae that satisfy fails_with_llvm? as
handle_llvm_failure() requires our ENV extension to get ENV.compiler.
Rather than requiring extend/ENV, just define fails_with_llvm? as false
since we don't really care about that when just unpacking a formula.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
We already have option completion for `brew install`; now we have it for
all core commands, and the --cache, --cellar, and --prefix flags now
have appropriate formula completion.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Per mxcl/homebrew@6b0c44d, @mxcl:
"And in that mind, brew missing is some cases an essential tool and
should absolutely be in the manpage."
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
The documentation on this is hard to find, and awareness of the command
itself is pretty low. Which is too bad, because it's really handy and I
use it all the time myself.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
While updating the bash completion script, I encountered some options
that were previously undocumented.
I purposely did not document the --macports and --fink flags for `brew
create`, because the exact same functionality exists in `brew search`.
Perhaps we should remove it from create.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Checking out over HTTP/HTTPS from GitHub requires git 1.6.6, as GitHub
only allows Smart HTTP transport.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This allows `brew audit` to inspect the head URLs, for example; until
now, that check was failing silently.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
The advertised default is that anything in share/info is removed unless
the user sets HOMEBREW_KEEP_INFO, but we've actually been installing the
files *unless* the variable is set. To illustrate:
$ unset HOMEBREW_KEEP_INFO
$ brew install -v wdiff
[...]
ln /usr/local/share/locale/af/LC_MESSAGES/wdiff-gnulib.mo
ln /usr/local/share/info/wdiff.info
ln /usr/local/share/info/dir
==> Summary
[...]
$ HOMEBREW_KEEP_INFO=1 brew install -v wdiff
ln /usr/local/share/locale/af/LC_MESSAGES/wdiff-gnulib.mo
==> Summary
[...]
Obviously not what we wanted.
ClosesHomebrew/homebrew#7989.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
:sha was used to prevent the "--depth" option to git clone, but was
never actually used to checkout the SHA.
ClosesHomebrew/homebrew#7859.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
These were being picked up as just "#{prefix}/lib" and prefix+'lib' due
to the eagerness of the regex. Reordering "lib" and "libexec" will take
care of it; I couldn't think of a more clever solution.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Commit dec4b73aa0 ("Allow `brew update --rebase`") changed the format of
the `git pull` command slightly, introducing an extra space (to allow
for the --rebase option), so let's update the test expectations for this.
We still need to write tests for '--rebase', but in the meantime they
once again pass for the normal case.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Commit 2695821e98 ("Only use the bottle if its version is up-to-date")
essentially broke the ImageMagick bottle, because the version parsing
logic returns "1" as the bottle version.
Fixing this requires only a slight modification to the bottle URL regex;
includes a test.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
A few formula use ARGV.flag? instead of ARGV.include?. This made `audit`
recognize a few undocumented instances of a '--devel' option, but we can
just ignore that like '--HEAD' for now, and change the behavior if we
decide they need to be documented explicitly in each formula.
cf. Homebrew/homebrew#7456.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>