Do the bottle check using any platform's bottle, so `brew pull` works
on bottled formulae which don't include a bottle for the current system.
Make output more concise and informative
* Remove expected download error messages when waiting for Bintray publishing
* Replace patch download progress bars with patch file name
* Silence git output about switching to and from bottle-pulling branch
* Include formula name and patch type in some progress messages
* add Language::Node helper module
This adds a language module for Node module based formulas.
It contains the 2 public methods `std_npm_install_args(libexec)` and
`local_npm_install_args`:
* `std_npm_install_args` is intended to be used in formulas for
standard node modules and returns `npm install` args for a global
style module installation to libexec.
* `local_npm_install_args` is for formulas, in which the `npm install`
step is only one of multiple parts of the installation process and
returns `npm install` args for a default local installation in place.
Both methods have in common, that they are
* making sure that a working copy of npm and node-gyp from node's
libexec is prepended to the PATH (to not rely of a user managed npm)
* seting the npm cache to HOMEBREW_CACHE/npm, which fixes issues caused
by overriding $HOME resulting in long install times + high disk usage
(see https://github.com/Homebrew/brew/pull/37#issuecomment-208840366)
* audit: update npm install check for Language::Node
* cleanup: remove npm_cache too
* doc: add Node-for-Formula-Authors.md
This prevents `brew` self-calls from interacting with the stickiness of
HOMEBREW_NO_ANALYTICS being persisted to the brew repo and accidentally
disabling analytics permanently when it should have been for just one run,
while restoring the stickiness of an explicit user-supplied
HOMEBREW_NO_ANALYTICS.
Provide a single command that can be run to disable analytics, run it if
`HOMEBREW_NO_ANALYTICS` is ever set and remove the user UUID file in
that case too.
References https://github.com/Homebrew/brew/issues/142.
Make sure that users are notified on the first run of `brew update`
after we enabled analytics about how it works and how to opt-out. This
will be shown to all users who have not already seen this message from
`brew update` or through a new Homebrew installation.
References https://github.com/Homebrew/install/pull/42
References https://github.com/Homebrew/brew/issues/142
Previously, syntax warnings were printed, but didn't cause `readall` to
exit with a non-zero exit code. Now they do, making it easier to catch
accidentally introduced syntax warnings in the test bot.
This collects all violations for each formula in a single place, instead
of doing `brew style` outputs for all formulae first, and then the other
audit checks.
Closes#112.
Signed-off-by: Andrew Janke <andrew@apjanke.net>
Instead of always printing the generic help text, print command-specific
help if it is available and a command raised the `UsageError` exception.
Put the error message underneath the help text (was above) to avoid that
it scrolls off the screen.
Thereby fix a regression where handling the invalid usage would fail to
access `ARGV.usage` removed in c6536066dc39da653d265640c6ba6046bb5def98.
Turns out making `empty_argv` a boolean argument for `Homebrew.help` was
not the best idea and having command-to-path mapping and help extraction
in a single method is not flexible enough.
Also only complain about missing help text when `HOMEBREW_DEVELOPER=1`
and otherwise just print the generic help text.
Format the usage examples more consistently (particularly parentheses
instead of square brackets where one of several alternatives has to be
picked). And add the now much more useful `brew help <command>`.
Closes#113.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
This implies that `--version` is treated in most places like a regular
command, e.g. being suggested in shell completion. Also fix the help
text that claimed output goes to standard error, while it actually goes
to standard output.
Pulls 'brew linkage' in to main brew repo as a dev-cmd, and has test-bot
use it to detect dylib breakage, which usually means a revision bump is
needed. Checks all dependents, not just those with a 'test do' block
defined, since we can do this without formula support.
Closes#107.
Signed-off-by: Andrew Janke <andrew@apjanke.net>
e70a3552d3 seems to have
exacerbated the problem where taps stick around and then `brew uses` gets executed
on a whole host of taps, which is currently breaking almost every PR for formulae
that would be used cross-tap, as well as causing lengthier CI builds.
Examples from the last week or so include sqlite, V8, protobuf, and so on. Whilst it
may be true that cross-tap formulae failing can show problems that need looking at,
a lot of the time the failures are unrelated to the build in question and just
leave contributors confused on what needs to be done, or why their PR is failing
for something that seems entirely unrelated.
You can see the taps failing to vanish locally by doing something like:
```
brew tap homebrew/fuse
brew tap homebrew/versions
cd $(brew --prefix) && git clean -ffdx --exclude=/Library/Taps/
brew tap
...
homebrew/core
homebrew/fuse
homebrew/versions
```
This is a very simple proposal to handle the problem, but there's no real reason
I couldn't write this functionality into untap itself and then we call that in
test-bot. Just didn't necessarily want to jump immediately to expanding the untap
command to solve what is more-or-less a CI problem.
Also enables sandbox for --interactive and --debug use of install
and test, using automatic retention.
Closes#66.
Signed-off-by: Andrew Janke <andrew@apjanke.net>
Keep the footprint of `brew.rb` small. Handle fetching/displaying an
appropriate help text (taking into account various external conditions)
in the `help` command.
Don't search for alternatives if formula was found, but has issues, as
this will create confusing output, particularly for contributors working
on a formula file.
Since edf000e4cd30c3626ccc28c52ed32f2d84a200dd `zsh` completions are in
`share/zsh/site-functions/_brew`, making this path a part of Homebrew.
Hide it from `brew list --unbrewed` to reduce confusion/noise.
Currently, brew audit --strict includes the name of the tap when calculating the
length of a formula's description. This makes it difficult to pass the audit for
formulas in taps with lengthy names. In #47033 @jawshooah called out head-only
or devel-only taps specifically, but this is an issue elsewhere. For example:
homebrew/versions/elasticsearch20: Distributed search & analytics engine (72)
This commit updates audit.rb to use formula.name rather than formula.full_name.
Closes#47033 -- Audit shouldn't include tap name in description length