This way analytics related settings and parameters (currently
analyticsdisabled, analyticsmessage and analyticsuuid) are all kept in
the same place.
Note that in this commit we offer a path of migration: if
~/.homebrew_analytics_user_uuid already exists, read the UUID from it,
write to homebrew.analyticsuuid, and remove it.
See more detailed discussions in #145.
Closes#162.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
* 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
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
Reorders the PR submission steps so `brew audit` is done after `brew install`,
so it can pick up issues with the installed formula, like non-executable stuff
in `bin/`. Matches the `test-bot` process better.
Minor style changes, including consistently using periods at the end of list items
which are complete imperative sentences.
Closes#127.
Signed-off-by: Andrew Janke <andrew@apjanke.net>
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>
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.
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>
By the commit edf000e4cd30c3626ccc28c52ed32f2d84a200dd, bash and zsh
completion scripts have been moved to `etc/bash_completion.d/brew` and
`share/zsh/site-functions/_brew`, respectively. Now completion will be
done automatically without any trick.
- add `HOMEBREW_PRODUCT` global variable
- only differentiate between `/usr/local` and `non-/usr/local` Homebrew
prefixes to avoid sharing sensitive user information
- note if e.g. build errors are occurring under CI
- Add `HOMEBREW_NO_ANALYTICS` variable (this will be how people opt-out
when this is enabled for everyone)
- Add `HOMEBREW_ANALYTICS_DEBUG` variable to output all the analytics
that are sent
- Move Bash analytics code to `Library/Homebrew/utils/analytics.sh`
- Add documentation for our analytics and why/what/when/how and opt-out
- Only official Homebrew commands are reported
- Ruby analytics are now reported in a forked, background process
Remove broken symlinks from `/Applications` and `~/Applications` that
were previously created by `brew linkapps`, but are no longer valid
because formulae were uninstalled or the provided apps have changed.
Add `--dry-run` option as is customary for destructive commands. Update
`bash` completion and man page accordingly. Also correct and update
documentation for both `brew linkapps` and `brew unlinkapps` in more
general terms.
Makes `tap` re-runnable and unshallows when requested with `--full`.
Tapping with a different URL raises an exception.
The homebrew/core tap cannot be untapped with `untap` so running
`brew tap --full homebrew/core` is now a built-in way to get a full
clone of this tap without resorting to workarounds.
Closes#17.
Signed-off-by: ilovezfs <ilovezfs@icloud.com>
The backticks being where they were, or not, caused text like
`<formula>` to not be shown when viewing the rendered text in a browser.
ClosesHomebrew/homebrew#50428.
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
The link to the Kickstarter Supporters file was broken. This new link
points to the ./Kickstarter-Supporters.md file.
ClosesHomebrew/homebrew#50335.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This can become handy when we separate core code and formulae. For
example, we could use `cd $(brew --repo homebrew/core)` to go to core
tap path.
ClosesHomebrew/homebrew#50346.
Signed-off-by: Xu Cheng <xucheng@me.com>
If a formula's class name contains an uppercase-spelled acronym, the
messages given by `brew install` can be pretty confusing (it recommends
a formula named exactly the same…)
ClosesHomebrew/homebrew#49639.
Signed-off-by: Tim D. Smith <git@tim-smith.us>
Based on recent feedback on some pull requests, I touched up the section about adding tests to formula.
I wanted to make it clearer that the examples demonstrate how to create files on the fly and add a pointer to the tinyxml2 formula (DomT4 pointed it out to me as a good example).
ClosesHomebrew/homebrew#49641.
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
We haven't seen this for a fair while since Apple pushed further updates to the
SIP mechanism and believe it to be far less of an issue than it was previously.
If you encounter further failure, please file an Issue and we'll be happy to
help! At the moment though this advice is making people think there _will_ be an
issue at some point, which isn't generally proving the case.
From `Library/Contributions/brew_zsh_completion.zsh`:
````bash
````
Then it should give symlinked file name of `_brew` instead of being just `brew_zsh_completion.zsh`
ClosesHomebrew/homebrew#48897.
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>