diff options
| author | CNA-Bld | 2015-07-27 18:51:53 +0800 |
|---|---|---|
| committer | Mike McQuaid | 2015-08-10 12:17:26 +0100 |
| commit | 56fcfdbea0014eb93c44d17337a357164fd8d89b (patch) | |
| tree | 0e28d0242770957143ea2129970f9fdac8fc1d6b /share | |
| parent | 4165b34ddeb99e67f9ad3ad856a28f28092aa779 (diff) | |
| download | brew-56fcfdbea0014eb93c44d17337a357164fd8d89b.tar.bz2 | |
update documentation
Diffstat (limited to 'share')
| -rw-r--r-- | share/doc/homebrew/brew-tap.md | 39 |
1 files changed, 32 insertions, 7 deletions
diff --git a/share/doc/homebrew/brew-tap.md b/share/doc/homebrew/brew-tap.md index 63ab09279..0f36135d4 100644 --- a/share/doc/homebrew/brew-tap.md +++ b/share/doc/homebrew/brew-tap.md @@ -54,14 +54,39 @@ edavis/emacs ## Formula duplicate names -If your tap contains a formula that is also present in master, that's fine, but -it means that you must install it explicitly. +If your tap contains a formula that is also present in master, that's fine, +but it means that you must install it explicitly by default. -For example, you can create a tap for an alternative `vim` formula, but in that -case when you install from there you must run the command with a more explicit -installation target: +If you would like to prioritize a tap over master, you can use +`brew tap-pin username/repo` to pin the tap, +and use `brew tap-unpin username/repo` to revert the pin. + +Whenever a `brew install foo` command is issued, brew will find which formula +to use by searching in the following order: + +* Pinned taps +* Core formulas +* Other taps + +If you need a formula to be installed from a particular tap, you can use fully +qualified names to refer to them. + +For example, you can create a tap for an alternative `vim` formula. Without +pinning it, the behavior will be ```bash -brew install vim # installs from Homebrew/homebrew -brew install username/repo/vim # installs from your custom repo +brew install vim # installs from Homebrew/homebrew +brew install username/repo/vim # installs from your custom repo ``` + +However if you pin the tap with `brew tap-pin username/repo`, you will need to +use `homebrew/homebrew` to refer to the core formula. + +```bash +brew install vim # installs from your custom repo +brew install homebrew/homebrew/vim # installs from Homebrew/homebrew +``` + +Do note that pinned taps are prioritized only when the formula name is directly +given by you. i.e., it will not influence formulae automatically installed as +dependencies.
\ No newline at end of file |
